PHP with MySQL 8.0+ error: The server requested authentication method unknown to the client [duplicate]

This question already has answers here: php mysqli_connect: authentication method unknown to the client [caching_sha2_password] (15 answers) Closed 2 years ago. I’m running MySQL version 8 on PHP 7.0. I’m getting the following error when I try to connect to my database from PHP: Connect Error: SQLSTATE[HY000] [2054] The server requested authentication method unknown to … Read more

How to grant all privileges to root user in MySQL 8.0

Tried mysql> GRANT ALL PRIVILEGES ON *.* TO ‘root’@’%’ IDENTIFIED BY ‘root’ WITH GRANT OPTION; Getting ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘IDENTIFIED BY ‘root’ WITH GRANT OPTION’ at line 1. Note: The … Read more