标签:localhost server password 密码 mysql
在MySQL刚装好两个实例的环境下,两实例启动后再关闭时报错;
[root@edb ~]# /data/3307/mysql stop
Stoping MySQL...
Enter password:
/application/mysql/bin/mysqladmin: connect to server at ‘localhost‘ failed
error: ‘Access denied for user ‘root‘@‘localhost‘ (using password: YES)‘
[root@edb ~]# /data/3306/mysql stop
Stoping MySQL...
Enter password:
/application/mysql/bin/mysqladmin: connect to server at ‘localhost‘ failed
error: ‘Access denied for user ‘root‘@‘localhost‘ (using password: YES)‘
解决方法:
为root设置密码
[root@edb ~]# mysqladmin -u root -S /data/3306/mysql.sock password ‘beatigirl‘
[root@edb ~]# mysqladmin -u root -S /data/3307/mysql.sock password ‘beatigirl‘
[root@edb ~]# /data/3306/mysql stop
Stoping MySQL...
[root@edb ~]# /data/3307/mysql stop
Stoping MySQL...
[root@edb~]# netstat -lntup|grep 330
标签:localhost server password 密码 mysql
原文地址:http://11860775.blog.51cto.com/11850775/1826811