mysql: 1045 access denied for user 'root'@'localhost' using password yes
2013-11-23 21:50
645 查看
环境: win7 mysql 5.6
输入设定的密码错误,报错" 1045 access denied for user 'root'@'localhost' using password yes "
首先停止mysql
C:> mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD(’新设密码newpassword’) where USER=’root’;
mysql> FLUSH PRIVILEGES;
mysql> quit
C:> 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>
输入设定的密码错误,报错" 1045 access denied for user 'root'@'localhost' using password yes "
首先停止mysql
C:> mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD(’新设密码newpassword’) where USER=’root’;
mysql> FLUSH PRIVILEGES;
mysql> quit
C:> 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>
相关文章推荐
- MySQL-在windows下 1045 access denied for user 'root'@'localhost' using password yes 解决办法 (转)
- MySql错误1045 Access denied for user 'root'@'localhost' (using password:YES) windows下的解决方案(忘记密码)
- windows mysql提示:1045 access denied for user 'root'@'localhost' using password yes 解决方案
- mysql: 1045 access denied for user 'root'@'localhost' using password yes
- MySQL5.5出面ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)问题的解决办法
- windows mysql提示:1045 access denied for user 'root'@'localhost' using password yes 解决方案
- mysql 链接失败(ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES))
- 解决mysql提示错误:1045 access denied for user 'root'@'localhost' using password yes
- (转载)解决MySql 数据库 提示:1045 access denied for user 'root'@'localhost' using password yes
- windows mysql提示:1045 access denied for user'root'@'localhost' using password yes
- [mysql] ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES).
- mysql:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- 错误代码1045 Access denied for user 'root'@'localhost' (using password:YES)
- mysql中Access denied for user 'root'@'localhost' (using password:YES)
- mysql安装在centos7报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- mysql登录:access denied for user 'root'@'localhost'(using password:YES)
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
- mac os x 安装mysql遇到 Access denied for user 'root'@'localhost' (using password: YES)的解决方法
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)