I am trying to configure a MySQL server to run multiple instances of the daemon (I wish to duplicate it onto different drives). I've been trying to use the mysqld_multi script. However the script is not finding the groups in /etc/mysql/my.cnf.

I copied and pasted the the configuration from msqld_multi --example into my.cnf, and this discovered the groups fines. However when I tried to modify the file below mysqld_multi report just displays:

Reporting MySQL servers
No groups to be reported (check your GNRs)

Below is an abbreviation of my my.cnf file.

socket          = /var/run/mysqld/mysqld.sock
nice            = 0

[mysqld1] #this is for the master server
pid-file =/var/run/mysqld/mysqld.pid
socket =/var/run/mysqld/mysqld.sock
port =3306

[mysqld2] #for the slave!
pid-file =/var/run/mysqld-slave/mysqld-slave.pid
socket =/var/run/mysqld-slave/mysqld-slave.sock
port =3307
datadir =/var/lib/mysql-backup
default-storage-engine =myisam
user            = mysql

basedir         = /usr
tmpdir          = /tmp

Here's a short bit from mysqld_multi --example

mysqld     = /usr/bin/mysqld_safe
mysqladmin = /usr/bin/mysqladmin
user       = multi_admin
password   = my_password

socket     = /tmp/mysql.sock2
port       = 3307

Can anyone spot why mysqld_multi isn't parsing this?

  • Did you run mysqld_multi start 1 and mysqld_multi start 2? – cuonglm Jun 5 '14 at 4:28
  • Yes, and it has absolutely no output. If I look in the error logs it just says it couldn't find any groups. – Micah Jun 5 '14 at 4:32
  • What's multi_admin's privileges? – cuonglm Jun 5 '14 at 4:38
  • -rwxr-xr-x 1 root root 23756 Apr 19 08:38 /usr/bin/mysqld_multi – Micah Jun 5 '14 at 4:47
  • -rwxr-xr-x 1 root root 1061 Apr 19 08:38 mysqld_multi.server Also I usually run it as sudo. – Micah Jun 5 '14 at 4:48

I found out the problem. Mysqld_multi can't parse comments at all, so you just need to remove all the comment lines with # before them from my.cnf.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.