Separate MySQL VPS


#1

Hello I currently use easyengine for my wordpress site. Due to traffic increases I want to migrate my database to another VPS, I want to keep the exisitng easy engine VPS running but I want to disable MySQL on it and instead have the original VPS remotely connect to the new database VPS. What is the best way to go about this?


#2

Hello ralatair, the tutorial is available here : https://easyengine.io/docs/remote-mysql/ You can install the latest MariaDB release v10.2 on your database server :

For Debian 8 Jessie :

apt-get install software-properties-common
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://lon1.mirrors.digitalocean.com/mariadb/repo/10.2/debian jessie main'
For Ubuntu 16.04 LTS Xenial :

sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://lon1.mirrors.digitalocean.com/mariadb/repo/10.2/ubuntu xenial main'

## install mariadb
apt update
apt install mariadb-server

Then run the command mysql_secure_installation To disable mysql on your current server :

systemctl stop mysql
systemctl disable mysql

#3

Hi thanks for your help and resources. How do I go about moving the data in the database to my new MariaDB server?


#4

The easiest is to dump your database :

mysqldump -u yourdatabaseuser -p database_name >  dump.sql

And to move the file with rsync or scp. Then you can import it with :

mysql -u yourdatabaseuser -p database_name < dump.sql

#5

Also, if you’ve installed PHPMyAdmin, you can export it from there

After you’ve migrated, you need to change the host parameter in the wp-config.php files of your sites


#6