Tag Archive for 'mysql'

Setting up MySQL replication

1. Settings to be done in Master DB server:

Edit my.cnf file (/etc/my.cnf) and enter the following:
server-id = 1
log-bin

2. Login to mysql DB in master server and run the following command:
mysql> show master status;

Continue reading ‘Setting up MySQL replication’

Defragmenting MySQL DB

Whenever there is change in the structure of a MySQL database, or we remove lot of data from a table, the files can  become fragmented which may result in the loss of performance, while running the queries. Continue reading ‘Defragmenting MySQL DB’