Browsing articles tagged with "mysqlreplication - Admins Goodies"
Dec 21, 2012
tom

How to check if MySQL replication is using SSL

I have a MySQL (actually mariaDB) install that I just started replicating to another server. I want to ensure that I’ve setup SSL correctly. The SSL portion of SHOW SLAVE STATUS looks like: Master_SSL_Allowed: Yes Master_SSL_CA_File: /etc/mysql/newcerts/ca-cert.pem Master_SSL_CA_Path: /etc/mysql/newcerts/ Master_SSL_Cert: /etc/mysql/newcerts/client-cert.pem Master_SSL_Cipher: Master_SSL_Key: /etc/mysql/newcerts/client-key.pem Seconds_Behind_Master: 0 Master_SSL_Verify_Server_Cert: No Is this typical or show that replication is using SSL? Is there something else I can check to ensure it’s using SSL? The slave is successfully replicating. […]

Continue Reading »
Nov 21, 2012
tom

MySQL master-slave lag replication

Our company is using TokuDB on production and we are having a lot of problems trying to mitigate lag on our slave. Is very strange, because we’re talking about very few rows… but with a few data it gets lagged. Slave is a read-only DB. For more information, we are using: CPU: Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz (4 cores) RAM: 16Gb HDD: 2Tb ST2000DM001 (EXT4 filesystem) Here you can see some I/O performance outputs. […]

Continue Reading »
Nov 20, 2012
tom

MySQL master-master replication between database running on 3 different server

I am trying to implement a master-master replication between 3 MySQL Databases running on 3 different servers. I implemented master-master replication for 2 servers, but can’t figure out how can I implement if for 3 different MySQL Servers. Does anyone know how to accomplish this? Asked by Mahendra You have to set it up as a ring — A is the master for B, B is the master for C, and C is the master […]

Continue Reading »
Sep 26, 2012
tom

Replicate between mysql 5.0.xx community and enterprise edition over ssh

I’m trying to setup a mysql replication over an SSH tunnel. The odd thing about this setup is that I have one master with mysql 5.0.60sp1-enterprise-gpl-log and one slave with mysql 5.0.67-community-log. Could it be so that it’s not possible to replicate between community and enterprise edition? As you can see in my log below, it’s possible to login on the remote server with the mysql client. But the replication get “Can’t connect to MySQL […]

Continue Reading »
Sep 24, 2012
tom

MySQL replicate multiple places

Very trick task to find a good title for this question, but here goes the q: I have a few development machines, where I develop my PHP applications on, and testing via a local webserver. This works out pretty well for each machine. However, I would like to replicate the DB from my machines to a central location. So, to sum up: DEV1 -> CENTRAL DEV2 -> CENTRAL DEV3 -> CENTRAL CENTRAL -> DEV1 CENTRAL […]

Continue Reading »
Sep 20, 2012
tom

Percona XtraDB Cluster – Node Won’t Join

I am trying to add a node to a new cluster but am met with the following log entries: 120915 16:47:32 [Warning] WSREP: error executing ‘SET GLOBAL innodb_disallow_writes=1′: 1193 (Unknown system variable ‘innodb_disallow_writes’). Was mysqld built with –with-innodb-disallow-writes ? 120915 16:47:32 [ERROR] WSREP: Failed to disallow InnoDB writes rsync: open “mysql/dummy.bak” (in rsync_sst) failed: Permission denied (13) rsync: open “test/dummy.bak” (in rsync_sst) failed: Permission denied (13) rsync error: some files/attrs were not transferred (see previous […]

Continue Reading »
Sep 1, 2012
tom

Rebuild mysql slave from scratch

I’m having a master/slave mysql setup. This night I had some problems with the master. I needed to recreate all databases again because they were corrupt. Now I stopped my mysql slave but want to start it again and rebuild everything from scratch. Is there a way to do this? Without locking the master… I also think the binlog file should be reset. So everything is clean again. Any ideas? Asked by Ward Loockx if […]

Continue Reading »
Jun 9, 2012
tom

MySQL slave server from dumps

I’ve created a slave server from live machine which is acting as a master now. I use the following procedure to create it: mysqldump –opt -Q -B –master-data=2 –all-databases > dump.sql then I imported this dump on the new machine, applied the “CHANGE MASTER TO…” directive with a log file/position from the dump. Please note that I have around 8000 databases and I didn’t stop the master while the dumps were running. The replication works […]

Continue Reading »
Jun 7, 2012
tom

RDS slave (read replica) not replication

It appears overnight our Master RDS mysql server went offline for 3-4 minutes. When it came back online the replication was broken. On the slave, issuing SHOW SLAVE STATUS\G; “Got fatal error 1236 from master when reading data from binary log: ‘Client requested master to start replication from impossible position’” In AWS monitoring, slave lag shows “-1.0″. Is there a way to get the slave replication restarted, or should I just create a new slave? […]

Continue Reading »
May 21, 2012
tom

mysql relay log corrupted, How to recover?

I am running with one master and two slaves in a chain. ie Master–>Primary Slave–>Secondary Slave. The relay log of primary slave got corrupted. How can I recreate the relay log of primary slave without making any changes to the Primary Slave –> Secondary Slave replication? Asked by arn If it’s the relay log (rather than the master bin log) which got corrupted, then STOP SLAVE (on both slaves) SHOW SLAVE STATUS on the failing […]

Continue Reading »