Reputation: 983
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.
access denied for user 'root'@'localhost'
I have tried to use the --skip-greant-tables to change the password and host from localhost to %. I have tried changing the OS hostname to localhost. I have also tried using --skip-name-resolve.
but still no chance.
any help appreciated
Upvotes: 2
Views: 3553
Reputation: 69
In Percona 5.7, the temporary password is stored in /var/log/mysqld.log so you can find it by:
grep 'temporary password' /var/log/mysqld.log
After that, you can start mysql
sudo systemctl start mysql
sudo /usr/bin/mysql_secure_installation
and use your temporary password to use.
Upvotes: 7
Reputation: 1172
After installing percona, you have to run these commands in order to set password for user root on mysql :
1- sudo systemctl start mysql
2- sudo mysql_secure_installation
Upvotes: 0