时间:2021-07-01 10:21:17 帮助过:26人阅读
在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
关闭多实例MySQL时报错
标签:localhost server password 密码 mysql