解决Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'问题
来源:互联网 发布:录像软件fraps 编辑:程序博客网 时间:2024/05/21 06:40
解决办法:
这种问题需要强行重新修改密码,方法如下:
/etc/init.d/mysql stop (service mysqld stop )/usr/bin/mysqld_safe --skip-grant-tables
另外开个SSH连接
[root@localhost ~]# mysqlmysql>use mysqlmysql>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)
清除密码、重置用户的文章:
First things first. Log in as root and stop the mysql daemon. sudo /etc/init.d/mysql stop Now lets start up the mysql daemon and skip the grant tables which store the passwords.sudo mysqld_safe --skip-grant-tables&(press Ctrl+C now to disown the process and start typing commands again)You should see mysqld start up successfully. If not, well you have bigger issues. Now you should be able to connect to mysql without a password.sudo mysql --user=root mysqlupdate user set Password=PASSWORD('new-password');flush privileges;exit; Now kill your running mysqld then restart it normally. sudo killall mysqld_safe&(press Ctrl+C now to disown the process and start typing commands again)/etc/init.d/mysql startYou should be good to go. Try not to forget your password again.
0 0
- ubuntu mysql问题 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YSE)解决
- 解决Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'问题
- 解决Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'问题
- 解决Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'问题
- Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'问题的解决
- 解决初次登录MySQL出现ERROR 1045 (28000):Access denied for user 'root'@'localhost'问题
- 解决Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'问题
- 解决Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'问题
- mySQL 初始登陆问题的解决ERROR 1045 (28000): Access denied for user 'root'@'localhost'
- 解决MySQL登录ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using passwor)问题
- 解决MySQL登录ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using passwor)问题
- 解决MySQL登录ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using passwor)问题
- 解决初次登录MySQL出现ERROR 1045 (28000):Access denied for user 'root'@'localhost'问题
- 解决 ERROR 1045 (28000): Access denied for user 'root'@'localhost'
- mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'
- MySQL Error 1045(28000) Access Denied for user 'root'@'localhost'
- Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'
- Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'
- LCA问题
- C程序的基础系统代码
- 关于Eclipse 自动重写某父类或者接口的方法@override
- java html javascript SQL 单双引号总结
- 解决使用valiform和同时上传多张图片问题
- 解决Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'问题
- 二级联动菜单
- R中访问数据框的几种方式
- SQLServer函数left()、charindex()、stuff()的使用
- “could not build module UIKit”问题的解决
- 程序员的薪资是怎么得来的?
- android jni eclipse中出现Type XXX could not be resolved解决办法
- LightOJ 1071 - Baker Vai 最大费用流
- PostgresSQL使用命令