Provisioning Remote Server w/ Remote SQL DB 'true' Issues

Provisioning a remote server with newest master branch of Trellis with the variable for remote sql set to true.
mysql_remote_database: true
I have tried it with it set to true from first provision (so no mariadb ever installed) and also provisioning first so mariadb gets installed then switching afterwards.

Either way Trellis will always fail when trying to connect to the remote db and will act like it can’t find a local database even though db_host is set to an IP address.

After trying a few things I decided to ssh into the server and install the package
mysql-client
(This is with no mariadb role run ever)
Then I edited /etc/mysql/my.cnf file and changed the variable from the local ip 127.0.0.1 to my remote IP, then everything worked as expected.

Anyone else experience anything like this or am I missing something.

I’m hoping that shouldn’t be necessary and it’s just a bug instead. Can you open an issue on our repo about this?

Issue created on the repo

@swalkinshaw tested out your PR to fix this issue and it worked perfectly as long as you already have the database created remotely example_com_development and the actual WP site will be installed on your blank database.

You sir are the man, thanks for the fix!

1 Like