Remote MySQL

Allow Remote Access

If you would like to access remote MySQL server from EasyEngine, You have to adjust some settings on remote MySQL server.

vim /etc/mysql/my.cnf

# skip-networking 

Now restart MySQL server:

service mysql restart

Grant Remote Access

mysql -u root -p

mysql > grant all privileges on *.* to 'root'@'<PUBLIC_IP_OF_EASYENGINE_SERVER>'  IDENTIFIED BY 'REMOTE_MySQL_PASSWORD' with grant option;
mysql> flush privileges;

Provide Remote MySQL Credential

For MySQL credential EasyEngine used /etc/mysql/conf.d/my.cnf file.
We need to add remote MySQL server details in  /etc/mysql/conf.d/my.cnf file

vim /etc/mysql/conf.d/my.cnf


Provide MySQL Grant Host Information

vim /etc/ee/ee.conf


Install MySQL Client

apt-get update
apt-get install mysql-client


We used following variables:

  1. REMOTE_MYSQL_HOST = Remote MySQL server IP address/FQDN
  2. REMOTE_MYSQL_USER = Remote MySQL server username
  3. REMOTE_MYSQL_PASSWORD = Remote MySQL server password
  4. PUBLIC_IP_OF_EASYENGINE_SERVER = EasyEngine server public IP address/FQDN
  5. REMOTE_MySQL_PASSWORD = Remote MySQL password for root user

If your EasyEngine server don’t have static public IP address then

Now you can create any website with EasyEngine and now EasyEngine used your remote MySQL server for database creation.