[英]Can not connect to mysql server (Percona)
I have installed percona server version 5.7 on my centos 7 .Now when I try to issue following command to connect to the server.我已经在我的centos 7上安装了percona 服务器版本 5.7 。现在当我尝试发出以下命令连接到服务器时。
access denied for user 'root'@'localhost'
用户'root'@'localhost'访问被拒绝
I have tried to use the --skip-greant-tables to change the password and host from localhost to %.我尝试使用--skip-greant-tables将密码和主机从 localhost 更改为 %。 I have tried changing the OS hostname to localhost .
我尝试将操作系统主机名更改为 localhost 。 I have also tried using --skip-name-resolve .
我也尝试过使用--skip-name-resolve 。
but still no chance.但仍然没有机会。
any help appreciated任何帮助表示赞赏
In Percona 5.7, the temporary password is stored in /var/log/mysqld.log so you can find it by:在 Percona 5.7 中,临时密码存储在 /var/log/mysqld.log 中,因此您可以通过以下方式找到它:
grep 'temporary password' /var/log/mysqld.log
After that, you can start mysql之后就可以启动mysql了
sudo systemctl start mysql
sudo /usr/bin/mysql_secure_installation
and use your temporary password to use.并使用您的临时密码来使用。
After installing percona, you have to run these commands in order to set password for user root on mysql :安装 percona 后,您必须运行这些命令才能在 mysql 上为用户 root 设置密码:
1- sudo systemctl start mysql
1-
sudo systemctl start mysql
2- sudo mysql_secure_installation
2-
sudo mysql_secure_installation
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.