Mysql问题Access denied for user 'root'@'localhost'问题的解决
来源:互联网 发布:独立域名网站 编辑:程序博客网 时间:2024/05/16 02:31
Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'问题的解决
这种问题需要强行重新修改密码,方法如下:
/etc/init.d/mysql stop (service mysqld stop )
/usr/bin/mysqld_safe --skip-grant-tables
另外开个SSH连接
[root@localhost ~]# mysql
mysql>use mysql
mysql>update user set password=password("123456") where user="root";
mysql>flush privileges;
mysql>exit
pkill -KILL -t pts/0 可将pts为0的**用户(之前运行mysqld_safe的用户窗口)强制踢出
正常启动 MySQL:/etc/init.d/mysql start (service mysqld start)
注意:另外还遇到需要service mysql star才能启动service mysql stop才能停止。
这种问题需要强行重新修改密码,方法如下:
/etc/init.d/mysql stop (service mysqld stop )
/usr/bin/mysqld_safe --skip-grant-tables
另外开个SSH连接
[root@localhost ~]# mysql
mysql>use mysql
mysql>update user set password=password("123456") where user="root";
mysql>flush privileges;
mysql>exit
pkill -KILL -t pts/0 可将pts为0的**用户(之前运行mysqld_safe的用户窗口)强制踢出
正常启动 MySQL:/etc/init.d/mysql start (service mysqld start)
注意:另外还遇到需要service mysql star才能启动service mysql stop才能停止。
还有直接使用mysql不能找到命令,错误为“bash: mysql: command not found”可以直接**mysql的安装目录中的bin文件夹跟绝对路径运行命令,还有的需要加./mysql 才能执行。
以上完成后,需对所有配置库为root授权方可使用
首先:登陆mysql重新设置密码,如:mysql> SET PASSWORD = PASSWORD('123456');这句话重新设置一次密码!
其次:执行授权语句:GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY 'rootadmin' WITH GRANT OPTION;
每次退出登陆,重复执行剔除进程命令pkill -KILL -t pts/0 ,防止进程被占用。
摘自:http://sundful.iteye.com/blog/704337
- mysql“Access denied for user 'root'@'localhost'”问题的解决
- mysql“Access denied for user 'root'@'localhost'”问题的解决
- mysql“Access denied for user 'root'@'localhost'”问题的解决
- Mysql“Access denied for user 'root'@'localhost'”问题的解决
- 解决mysql“Access denied for user 'root'@'localhost'” 的问题
- mysql“Access denied for user 'root'@'localhost'”问题的解决
- mysql解决 Access denied for user ‘root’@’localhost’ 问题
- Access denied for user 'root'@'localhost'问题的解决
- MySQL 'Access denied for user 'root'@'localhost' 的问题
- Mysql问题Access denied for user 'root'@'localhost'问题的解决
- 解决MySQL #1045 - Access denied for user 'root'@'localhost' (using password: YES) 的问题
- Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'问题的解决
- mySQL 初始登陆问题的解决ERROR 1045 (28000): Access denied for user 'root'@'localhost'
- MySQL5.7,解决Access denied for user 'root'@'localhost' 问题
- 完美解决Mysql的Access denied for user 'root'@'%'问题
- MySQL问题系列---Access denied for user root'@'localhost
- 解决mysql的“Access denied for user ‘root’@'localhost’”
- 遇到1045-Access denied for user 'root'@'localhost' 的问题
- java 怎么确保输入整型 InputStreamReader BufferedReader
- IOS之KVC,KVO,KVB
- Myeclipse修改Servlet模板类操作
- 黑马程序员:如何结束线程及线程中的其他方法介绍:interrupt()、join()、yield()等方法
- 原型模式
- Mysql问题Access denied for user 'root'@'localhost'问题的解决
- 自适应参数估计+滑模变结构控制高超声速飞行器(源代码)
- cocos2dx-2.2 创建Android工程
- 【D3.js数据可视化系列教程】(二十七)--径向树
- PowerDesigner导入MySql步骤和解决问题Non SQL Error : Could not load class com.mysql.jdbc.Driver
- HOG行人检测 如何制作样品
- 校园网如何翻过网关访问外网?
- 用Python画白云VIP@ZheJiang
- Sizeof与strlen的区别与联系