Updated : Jan 03, 2013 in Linux

Mysql Loop replicating in Debian Squeeze

I have been doing replicating from master to Slave for quite a while and sometimes found it a bit limited especially when the master in…

Updated : Aug 20, 2012 in MySQL

Flushing mySQL Binary logs

In order to keep the disk usage of the binlogs down while having replication, it is necessary to periodically perform a PURGE BINARY LOGS command.…

Updated : Oct 09, 2010 in Linux

Running a second instance of mysqld

Sometimes it's needed to have 2 instances of mysql daemon in the same server. In that case I decided to use the port 3307 for…

Updated : Mar 16, 2010 in MySQL

Various MySQL useful commands

Repairing all MySQL tables mysqlcheck --repair --extended --all-databases ------------- Dumping the content of all databases in SQL format. (can be used for backup/migration purposes) mysqldump…

Updated : Feb 24, 2010 in MySQL

Retrieving lost MySQL root password

It often happens. You are given the job of administrating a MySQL server where the root password was lost. What to do? Here is the…

Updated : Jan 03, 2010 in MySQL

Tool to unstick MySQL Replicators.

# I'm managing an infrastructure with a number of databases who # (for codified reasons that I cannot influence) suffer from this situation often. #…

Updated : Jan 03, 2010 in MySQL

Slave rebuild from live slave.

It is also possible to set up a slave by dumping an existing slave of the master. To do this, use the following procedure on…

Updated : Jan 03, 2010 in MySQL

PROBLEM: Could not find target log during relay log initialization

SOLUTION: delete relay bin file in slave and try slave stop ; CHANGE MASTER TO master_log_file='name_of_current_file_on_master',master_log_pos=4; slave start; it will download play again the file…

Updated : Jan 03, 2010 in MySQL

FULL Manual rebuilding of SLAVE MySQL server mysql02 from Master mysql01

On mysql01 (MASTER): -------------------- mysqldump -u root -p --single-transaction --flush-logs --master-data=2 --all-databases --delete-master-logs | gzip | ssh mysql02 'cat | gunzip >/var/lib/mysql_temp.sql' echo "SHOW MASTER…

Updated : Jan 03, 2010 in MySQL

MySQL replication issues

Good links: =========== http://www.howtoforge.com/how-to-repair-mysql-replication MySQL recover from Backup .sql data ====================================== mysql -u root -p dbName backup-dbNameDump.sql ----------- Very useful in slave -------------------------------------------------------------- slave-skip-errors=126,1062 126…