/var/net/sys/admin/blog

I.Configure Master

1. edit /etc/mysql/my.cnf. We have to enable networking for MySQL,

I.Configure Master

1. edit /etc/mysql/my.cnf. We have to enable networking for MySQL,

#skip-networking

2. Add the following line to the my.cnf

server-id = 1
log-bin=/storage/lun0/db/mysql/FLTVM01-bin

3. restart mysql
#service mysqld restart

4.     log into the MySQL database as root and create a user with replication privileges:

#mysql -u root -p
mysql> GRANT REPLICATION SLAVE ON *.* TO ‘slaveuser’@'%’ IDENTIFIED BY ‘<some_password>’; (Replace <some_password> with a real password!)
mysql>FLUSH PRIVILEGES;

One of the most important procedure in setting up master-slave replication on Mysql database successfully is to have a consistent dump or backup of database(s) from the master server by locking all tables during mysqldump so write access is not possible.

master log file and log position will be taken from the master and configure it on the slave server. But it’s not always good times. There are some bad times too. And one of it is sudden stop of your slave and no longer synching with the master database.

 

About FLT

This site is dedicated to everyone who likes to learn and explore the beautiful world of Linux. If you have comments and suggestions, please feel free to email at comments@freelinuxtutorials.com. I am happy to serve and share things esp. that is free and enjoyable as Linux.