devilbox
devilbox copied to clipboard
Inside PHP container: unable to connect to MySQL 8+
Have you already checked elsewhere?
- [X] I have read the Devilbox documentation
- [X] I have checked the Devilbox Troubleshooting Guide
- [X] I have checked the Devilbox FAQ
- [X] I have checked the Devilbox Howto
- [X] I have checked the Devilbox Forum
- [X] I have checked existing issues
- [X] I have googled already with no luck
- [ ] I have not done any of the above
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+