High performance MySQL, live.


We need to upgrade our dying MySQL server. It serves more than 30 databases, some of them having multi-million-row tables, for more than 10 different projects, one of them being jamendo.

With the cool book, I just began configuring from scratch our new MySQL server, with replication and all the good stuff.

So here we go. A little emerge-webrsync to sync both servers (master is” vador”, slave is “yoda” : not logical but well…)… This is sooo long, I remember early gentoo days, it only took like 2 minutes back then :/ mysql-4.0.24 is the gentoo HEAD, we’ll stick to that. USE flags for mysql : “readline innodb tcpd ssl perl”.

Next step is creating the replication user on both master and slave :

mysql> FLUSH PRIVILEGES;
mysql> GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO repl@“192.168.0.0/255.255.255.0” IDENTIFIED BY “xxxxxxx”;
mysql> FLUSH PRIVILEGES;

Here are my edits of the configuration for the master :

log-bin
server-id = 193 #use IP
log-bin = /home/mysql/repl/log-bin

For the slave :

server-id = 196
read-only #only accept queries from replication
master-host = 192.168.0.193
master-user = repl
master-password = xxxxxxxxxxx
master-port=3306

A few restarts later replication is working.

Oops, while reading the book I just stumbled upon the sentence “There
is currently no workaround to this problem. Make sure the power cables
are plugged in tightly !“… Quite frightening, uh ?