How to connect to MariaDB thru external app like Sequel Pro?


#1

I do not use phpMyadmin to manage DB. Using a native application like SequelPro is a much better solution.
If at the start of the container its IP address changes, it is impossible to save the connection parameters in the external application. How can I forward a connection to the database through the primary host?


#2

I have not seen the ip address change, but I will keep an eye on it. Here is a more complete setup for Sequel Pro for others to follow. I will update here if we find a better way to grab the ee-global-db address.

You need to grab the ip address of the db container for the ‘MySQL Host’ field like this:
docker inspect ee-global-db | grep IPAddress

Fetch the db root password with this:
cat /opt/easyengine/services/docker-compose.yml | grep MYSQL_ROOT_PASSWORD

Make sure you can ssh connect to your server via ‘ssh hosting1’. This setup has ‘hosting1’ setup in ~/.ssh/config with all of the details to make an ssh connection.
sequel-pro-ee4

The ssh config file on your mac should look something like this

host hosting1
  hostname hosting1.example.com
  identityfile ~/.ssh/private-key.pem
  user ubuntu

#3

thx. I will try it


#4

It works like a charmed. Thank you!