Category ‘MySQL’

MySQL replication - master migration

Monday, 26.04.2010.

This cookbook explains how to move MySQL master server to another host. Scenario in short goes: dump out master databases, import data on the new master server and point slave to the new master server. If you follow this simple steps, master migration should proceed without problems.

1 response so far

MySQL query logging

Friday, 19.06.2009.

Small tip of how to log all queries done by the MySQL server. It is very useful if you want to preview SQL requests from WordPress, Joomla or any other system or client. After logging is enabled, server will write information to the log file when clients connect or disconnect, and it will log each SQL statement.

No responses yet

How to add a new MySQL slave

Monday, 16.02.2009.

This post explains how to add a new slave to the existing MySQL replication. New slave server can be added to the MySQL replication without stopping master or shutting down existing slave server. You will have to temporarily stop replication on the slave server in order to take the current data snapshot.

9 responses so far

MySQL replication recovery

Friday, 06.02.2009.

MySQL replication can stop if slave fails to execute SQL statement from the binary log. From that moment, slave prints last error and waits for replication recovery. If master has consistent snapshot, then is only necessary to re-point slave to the new master position. It can be done with "change master to" or "sql_slave_skip_counter".

1 response so far