Last Updated on July 1, 2023 by Vikash Ekka
PhpMyAdmin error requested authentication method unknown to the client [caching_sha2_password] |
To fix this issue you have to do ALTER user in table and provide complex password. Below is the two line of command that you have to enter into MySQL database.
Replace your user and user_password with your own.
mysql> ALTER USER ‘user’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘user_password’;mysql> FLUSH PRIVILEGES;
mysql> exit
If above is not fixed your error/issue then create a new user with grant privileges and login with new credentials.
mysql> create user ‘vetechno’@’localhost’ identified by ‘vetechno@@1234’;mysql> grant all privileges on . to ‘vetechno’@’localhost’;
mysql> ALTER USER ‘vetechno’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘vetechno@@1234’;
mysql> FLUSH PRIVILEGES;
mysql> exit
Conclusion
I hope this tutorial post has helped you to fix the [caching_sha2_password] on Ubuntu 18.04 LTS. Please feel free to ask your queries if you are facing any difficulties when creating new user on mysql.
Also Read:- How to install MySQL 5.5 on Ubuntu 20.04 LTS
Also Read:- Uninstall or Remove MySql 5.7 from Ubuntu 20.04 LTS.
Also Read:- How to install Mysql 5.6 on Ubuntu 18.04 LTS.
Thanks 👍