Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

[mysqld_safe]
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
datadir=/var/lib/mysql
server-id=1
log-bin=mysql-bin

[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
server-id=2
skip-innodb
default-storage-engine =myisam
[mysqld_multi]
user            = mysql

[mysqld] 
basedir         = /usr
tmpdir          = /tmp
...

Here's a short bit from mysqld_multi --example

[mysqld_multi]
mysqld     = /usr/bin/mysqld_safe
mysqladmin = /usr/bin/mysqladmin
user       = multi_admin
password   = my_password

[mysqld2]
socket     = /tmp/mysql.sock2
port       = 3307
...

Can anyone spot why mysqld_multi isn't parsing this?

share|improve this question
    
Did you run mysqld_multi start 1 and mysqld_multi start 2? –  cuonglm Jun 5 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 at 4:32
    
What's multi_admin's privileges? –  cuonglm Jun 5 at 4:38
    
-rwxr-xr-x 1 root root 23756 Apr 19 08:38 /usr/bin/mysqld_multi –  Micah Jun 5 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 at 4:48

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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