Freebsd mysql 5.5 error log

freebsd mysql 5.5 error log

I am using FreeBSD 9.2 and mysql 5.5 and i am using SOMETIMES this error - * Lost connection to MySQL server at 'reading initial. It is enabled (1) by default and can be disabled by setting it to 0. Aborted connections are not logged to the error log unless the value is greater than 1. As. Log files are typically located at /var/log/. MySQL server log files are usually identified by. freebsd mysql 5.5 error log  449494   Binlog_Ignore_DB
+————–+———-+————–+——————+

Take a note of the 'File' and 'Position'. This will be required later.

As some of the databases are InnoDB we will need to shut down the MySQL server and copy the raw data via rsync to the slave server. If you can't afford any downtime then you'll need to take a snapshot of the databases using mysqldump and then import it into the slave. The following is uses the rsync method.

# mysqladmin -u root -p shutdown

 

(5) ON SLAVE

 

Sync data from /data/mysql directory on master to slave. For this I used this command:

# /usr/local/bin/rsync -avpro --delete 10.1.1.1::alldbs /data/mysql/

I actually did a sync when the data was live before stopping the master mysql server and doing it again when it wasnt running. This minimised downtime as the sync was a lot quicker.

Note: alldbs is an rysnc module on the master server which just points to /data/mysql locally, freebsd mysql 5.5 error log.

(When complete make sure to start the mysql server on the MASTER)

 

(6) ON SLAVE

Edit my.cnf and add skip-slave-start

Start the mysql server ( /usr/local/etc/rc.d/mysql-server start )

mysql> CHANGE MASTER TO MASTER_HOST='10.1.1.1', MASTER_USER='replicationuser', MASTER_PASSWORD='PASSWORD', MASTER_LOG_FILE='mysql.000002', MASTER_LOG_POS=449494;

 

mysql> START SLAVE;

Note: Dont forget to uncomment the "skip-slave-start" from my.cnf

 

You can get the status of the replication by logging into the slave server

mysql> SHOW SLAVE STATUS;

 

As of MySQL 5.5 any new databases added will automatically get pushed over to the slave afterwards.