Skip to Content

Migrate Ezeelogin database to RDS / remote SQL instance

How to Migrate Ezeelogin database to rds / remote SQL instance 


To initiate the migration process, we'll begin by backing up the existing Ezeelogin database. Next, we'll proceed to establish a new RDS MySQL instance, grant privileges, and restore the previously backed-up database. And update the db_host parameter in the ez.conf file.

              Adhere to the following steps to transfer the database to an RDS or Remote Mariadb instance.

Step 1.  Take the backup of the Ezeelogin database with mysqldump command and retrieve the Ezeelogin database name, database username, and database password. 

               Run the following command to retrieve the DB credentials.

root@ezeelogin:~# php /usr/local/ezlogin/eztool.php -show_db_credentials

              Enter the Ezeelogin administrator password, to reveal the DB credentials.


Step 2. Take the MySQL database backup by running the following command.

root@ezeelogin:~# mysqldump ezlogin_databasename > ezlogin_databasename_backup.sql -p


Step 3. Create a new RDS MySQL instance and create an empty database by logging into MySQL and grant the database with the MySQL database user and password of the Ezeelogin database. 

root@ezeelogin:~# mysql -u masteruser -p

root@ezeelogin:~# create database ezeelogin_databasename;

root@ezeelogin:~# create user ezlogindatabaseuser;

root@ezeelogin:~# grant all privileges on ezlogin_dbname.* to ezlogin_dbusername@'%' identified by 'ezlogin_dbpassword'; 

(replace with your ezeelogin db details)

root@ezeelogin:~# flush privileges;


Step 4. Restore the database backup using the following command. You should replace  MySQL logins with yours.

root@ezeelogin:~#  mysql -h -u masteruser -p ezlogin_databasename < ezlogin_databasename_backup.sql


Step 5:  Replace the " db_host " with the hostname of the new RDS instance on  /usr/local/etc/ezlogin/ez.conf file.

Skip this step if you are using remote SQL instance.

root@ezeelogin:~# nano /usr/local/etc/ezlogin/ez.conf

cver 2
system_folder /var/www/ezlogin/
www_folder /var/www/html/ezlogin/
uri_path /ezlogin/
force_https no
db_host Replace_with_the_hostname of new instance
db_port /var/run/mysqld/mysqld.sock
db_name ezlogin_tbxtj
db_user ezlogin_tccrl
db_pass 2lfX8aRgTSV3ZINTnQ6GvWAd6qnbscYF8PNtHH2BMf9rw3mg5bPlS9ecizoshq77vLeLBQQTy0i1EntuJUtZsWvFdy47hPYCXMsLSYAuoI4=
db_prefix veb_
cookie_encryption_key NB6fMmb73Xx0oHWxGttGmU9cil7u5lTbD1PusRxo41cVL3EnFWW2+MGfqIOnW3C6lL9AesPeEYmneJhZeItXOuaTccgRaRwe9BZrpVQXHJg=
cookie_name mzeyd
cookie_path /ezlogin/
admin_user ezadm428
mysql_encrypt no


Step 6. Login to Ezeelogin GUI, EZSH shell, and verify the working of Ezeelogin.


For Reference:

Configure Ezeelogin on AWS RDS

Configure Jumpserver to use SSL for AWS RDS

Can we use the same instance since it is multi-AZ