Tungsten Replicator: MariaDB MySQL Master/Slave server setup on single server
Previous Tungsten Replicator article dealt with MySQL master/slave server setup on two separate MariaDB MySQL servers (.101 master and .102 slave). This time I tried setting up both master and slave on the same single .101 server. To do this, I installed a second MariaDB 5.2.7 MySQL server instance on same server running from port 3309 and the second Tungsten Replicator installation for the slave server ran from it’s own Tungsten Home & THL directories and separate THL and RMI ports.
Recently, a vBulletin customer on vBulletin.com support forums asked about ways of backing up a 30+ GB MyISAM/InnoDB mixed forum database with the least negative effect on forum performance as possible. Besides R1Soft CDP MySQL plugin backup, the consensus by a few forum members was the solution to setup MySQL replication and to run database backups from the slave server. But not everyone has spare additional servers lying around to act as MySQL slaves.
So as I’m just starting to play around with Tungsten Replicator, I decided to try this Tungsten Replicator master/slave configuration on single server setup. The objective is to setup a Tungsten Replicator slave on the same server as the master and just use the slave for MySQL database backups. Tungsten Replicator also have backup options you can configure as well (see documentation), but haven’t gotten that far yet. Next on my to do list.
Example section for slave replicator configuration for Backup/Restore:
[root@centos6 ~]# mysqladmin create testlocalslavedb |
Tungsten Replicator: MariaDB MySQL master/slave setup on single server
I tried this last night but had encountered a few issues getting the right Tungsten installer syntax for adding the new slave to existing .101 master. Luckily, Giuseppe Maxia was able to help steer me in the right direction. Thanks Giuseppe :)
Step 1).
Install second MariaDB 5.2.7 MySQL server instance on same .101 master server running from port 3309.
[root@centos6 ~]# ls -alh /var/lib/{mysql,mysql2} <strong>/var/lib/mysql:</strong> total 2.2G drwxr-xr-x. 9 mysql mysql 4.0K Sep 19 08:55 . drwxr-xr-x. 41 root root 4.0K Sep 19 08:37 .. -rw-rw----. 1 mysql mysql 16K Sep 19 06:32 aria_log.00000001 -rw-rw----. 1 mysql mysql 52 Sep 19 06:32 aria_log_control -rw-rw----. 1 mysql mysql 155 Sep 16 14:19 centos6.err -rw-rw----. 1 mysql mysql 5 Sep 19 08:42 centos6.localdomain.pid -rw-rw----. 1 mysql mysql 5 Sep 18 05:57 centos6.pid -rw-rw----. 1 mysql mysql 2.0G Sep 19 08:55 ibdata1 -rw-rw----. 1 mysql mysql 17K Aug 10 01:52 ibdata1.gz -rw-rw----. 1 mysql mysql 64M Sep 19 08:55 ib_logfile0 -rw-rw----. 1 mysql mysql 16K Aug 10 01:52 ib_logfile0.gz -rw-rw----. 1 mysql mysql 64M Sep 18 05:57 ib_logfile1 -rw-rw----. 1 mysql mysql 5.1K Aug 10 01:25 ib_logfile1.gz drwx------. 2 mysql mysql 4.0K Sep 16 14:19 mysql -rw-rw----. 1 mysql mysql 125 Sep 17 15:50 mysql-bin.000001 -rw-rw----. 1 mysql mysql 665 Sep 17 16:42 mysql-bin.000002 -rw-rw----. 1 mysql mysql 259 Sep 18 05:49 mysql-bin.000003 -rw-rw----. 1 mysql mysql 259 Sep 18 05:57 mysql-bin.000004 -rw-rw----. 1 mysql mysql 1.2K Sep 18 06:37 mysql-bin.000005 -rw-rw----. 1 mysql mysql 1.1K Sep 18 08:55 mysql-bin.000006 -rw-rw----. 1 mysql mysql 1.4K Sep 18 15:52 mysql-bin.000007 -rw-rw----. 1 mysql mysql 414 Sep 18 15:52 mysql-bin.000008 -rw-rw----. 1 mysql mysql 125 Sep 18 18:23 mysql-bin.000009 -rw-rw----. 1 mysql mysql 125 Sep 18 18:26 mysql-bin.000010 -rw-rw----. 1 mysql mysql 125 Sep 18 19:30 mysql-bin.000011 -rw-rw----. 1 mysql mysql 125 Sep 18 20:04 mysql-bin.000012 -rw-rw----. 1 mysql mysql 125 Sep 18 20:34 mysql-bin.000013 -rw-rw----. 1 mysql mysql 125 Sep 18 20:39 mysql-bin.000014 -rw-rw----. 1 mysql mysql 106 Sep 18 20:45 mysql-bin.000015 -rw-rw----. 1 mysql mysql 529 Sep 19 05:52 mysql-bin.000016 -rw-rw----. 1 mysql mysql 125 Sep 19 06:04 mysql-bin.000017 -rw-rw----. 1 mysql mysql 125 Sep 19 06:22 mysql-bin.000018 -rw-rw----. 1 mysql mysql 125 Sep 19 06:32 mysql-bin.000019 -rw-rw----. 1 mysql mysql 106 Sep 19 06:37 mysql-bin.000020 -rw-rw----. 1 mysql mysql 106 Sep 19 08:09 mysql-bin.000021 -rw-rw----. 1 mysql mysql 638 Sep 19 08:55 mysql-bin.000022 -rw-rw----. 1 mysql mysql 418 Sep 19 08:42 mysql-bin.index srwxrwxrwx. 1 mysql mysql 0 Sep 19 08:42 mysql.sock -rw-r--r--. 1 root root 13 Sep 16 14:19 mysql_upgrade_info drwx------. 2 mysql mysql 4.0K Aug 10 01:25 test drwx------. 2 mysql mysql 4.0K Sep 18 07:04 test2 drwx------. 2 mysql mysql 4.0K Sep 18 15:37 test3 drwx------. 2 mysql mysql 4.0K Sep 19 08:55 testlocalslavedb drwx------. 2 mysql mysql 4.0K Sep 18 06:04 tungsten drwx------. 2 mysql mysql 4.0K Sep 18 06:37 tungsten_rep1 <strong>/var/lib/mysql2:</strong> total 385M drwxr-xr-x. 8 mysql mysql 4.0K Sep 19 08:55 . drwxr-xr-x. 41 root root 4.0K Sep 19 08:37 .. -rw-rw----. 1 mysql mysql 16K Sep 19 08:47 aria_log.00000001 -rw-rw----. 1 mysql mysql 52 Sep 19 08:47 aria_log_control -rw-rw----. 1 mysql mysql 0 Sep 19 08:37 centos6.err -rw-rw----. 1 mysql mysql 5 Sep 19 08:47 centos6.localdomain.pid -rw-r-----. 1 mysql mysql 3.2K Sep 19 08:47 error.log -rw-rw----. 1 mysql mysql 256M Sep 19 08:50 ibdata1 -rw-rw----. 1 mysql mysql 64M Sep 19 08:55 ib_logfile0 -rw-rw----. 1 mysql mysql 64M Sep 19 08:47 ib_logfile1 drwx------. 2 mysql mysql 4.0K Sep 19 08:37 mysql -rw-rw----. 1 mysql mysql 20K Sep 19 08:37 mysql-bin.000001 -rw-rw----. 1 mysql mysql 701K Sep 19 08:37 mysql-bin.000002 -rw-rw----. 1 mysql mysql 336 Sep 19 08:47 mysql-bin.000003 -rw-rw----. 1 mysql mysql 57 Sep 19 08:47 mysql-bin.index srwxrwxrwx. 1 mysql mysql 0 Sep 19 08:47 mysql.sock drwx------. 2 mysql mysql 4.0K Sep 19 08:37 test drwx------. 2 mysql mysql 4.0K Sep 19 08:50 test2 drwx------. 2 mysql mysql 4.0K Sep 19 08:50 test3 drwx------. 2 mysql mysql 4.0K Sep 19 08:55 testlocalslavedb drwx------. 2 mysql mysql 4.0K Sep 19 08:47 tungsten_rep1 |