devilbox icon indicating copy to clipboard operation
devilbox copied to clipboard

Inside PHP container: unable to connect to MySQL 8+

Open wp4nuv opened this issue 3 years ago • 0 comments

Have you already checked elsewhere?

What are you struggling with?

Usually, with MySQL version 5.7 and below, mysql -h MySQL -u root -p connects with no problem. With MySQL 8+, this doesn't work anymore. I thought it was the MySQL client version of PHP 7.4, so I switched to 8.0 for a test, but it had the same result. Creating a custom config file would solve this problem, but it should be optional if the image already accepts a password on creation. Am I missing anything?

Error

ERROR 1045 (28000): Plugin caching_sha2_password could not be loaded: /usr/lib/x86_64-linux-gnu/libmariadb3/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory

What have you tried already?

Switched PHP versions in hope the mysql client would work.

What is your goal?

Import a database into mysql 8.0+

wp4nuv avatar Feb 11 '23 16:02 wp4nuv