ERROR 1045 (28000): Access denied for user 'root'@'localhost'
来源:互联网 发布:京瓷1800扫描软件 编辑:程序博客网 时间:2024/06/05 22:38
方法一:
# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
# /etc/init.d/mysql restart
# mysql -uroot -p
Enter password: <输入新设的密码newpassword>
mysql>
方法二:
直接使用/etc/mysql/debian.cnf文件中[client]节提供的用户名和密码:
# mysql -udebian-sys-maint -p
Enter password: <输入[client]节的密码>
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
# mysql -uroot -p
Enter password: <输入新设的密码newpassword>
mysql>
方法三:
这种方法我没有进行过测试,因为我的root用户默认密码已经被我修改过了,那位有空测试一下,把结果告诉我,谢谢!!
# mysql -uroot -p
Enter password: <输入/etc/mysql/debian.cnf文件中[client]节提供的密码>
至此,困惑多时的问题解决了!
- 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'
- 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'
- 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'
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' 错误
- Ubuntu ERROR 1698 (28000): Access denied for user 'root'@'localhost'
- mysql ERROR 1045 access denied for user 'root'@'localhost' using
- 安装Solaris10
- SSH的整合技巧与开发步骤
- 我的css
- 我的页面
- JS操作Cookies
- ERROR 1045 (28000): Access denied for user 'root'@'localhost'
- IIS 6.0下架设wap网站。
- mvc页面
- 春夏之交吃水果要注意
- display:none和visibility:hidden的区别
- 基于Visual C#2010 与WPF开发Windows 7电源管理
- __int64和按位与求1的个数
- 自我采访
- 一个简单方便的ANSI和UNICODE互转方法