By default MySQL
8.x doesn’t work with older versions of PHP.
You get an error:
The server requested authentication method unknown to the client: [caching_sha2_password]
How to get around it?
The solutions are very simple - you can either upgrade PHP to
or if you want to stick to an older version force MySQL to use the old
authentication method by default. All you have to do is add:
to your MySQL config file, e.g.
/etc/mysql/conf.d/my.cnf on the official