V4 MariaDB root access

Just restoring the database to a different server doesn’t mean you are setup for remote connections on the mysql side. While I don’t use easyengine with a remote database again that defeats the purpose of this project. I can tell you when I have a working site in ee4 and I change the /opt/easyengine/sites/example.com/app/wp-config.php DB_HOST variable, I see an immediate change of the site going from working to not working. That tells me the site is pulling the server name from there. Have you made a successful remote connection to your mysql database using an outside machine? Attempt to connect directly from a mac workstation using Sequel Pro, the mysql command line from a Linux machine or another server, or the GUI / front-end tool of your choice on Windows.

https://support.rackspace.com/how-to/mysql-connect-to-your-database-remotely/

Thanks so much. In the end it was because I wax using MySQL 8.0.13 and client doesn’t support caching_sha2_password. I had to create mysqli_native_password then it started working. This meant I had to install php-mysqli on Nginx server side. Finally I had to clear mysqladmin flush hosts since there were so many failed attempts to connect.

Unfortunately connecting from Nginx to MySQL via mysql-client didn’t show me all this! My MySQL guru had to take a look. Since eev4 uses MariaDB, the “fault” is largely mine. My SQL server isn’t ee, it’s just standard mysql comm edition 8.0.13 on amazon linux 2 AMI.

Thanks again, mram!

Glad it worked out. It’s so hard to tell if others on a forum asking for help doing things a certain way are for the right reasons. Another positive here is it got me to organize my scripts and post them for others. Even if they are still a work in progress.

1 Like

That solution doesn’t work for me in Local Mojave MacOS.

I dont really know what to do locally:

I get the MySQL Pass:

cat ~/easyengine/services/docker-compose.yml | grep MYSQL_ROOT_PASSWORD

I get the local IP:

docker inspect services_global-db- | grep IPAddress

I change the MDB permissions inside mysql -u root -p the Container

what I’m missing??

thank you

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.