LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   mysqld_multi errors when starting servers, servers start when run manually (http://www.linuxquestions.org/questions/linux-server-73/mysqld_multi-errors-when-starting-servers-servers-start-when-run-manually-910657/)

jason.rohde 10-28-2011 10:47 AM

mysqld_multi errors when starting servers, servers start when run manually
 
I am setting up multiple instances of mysql 5.5 server on a single host and trying to manage the instances using the mysqld_multi tool. Ia m able to get each instance to run without issue when I start each manually via nthe following command.

Code:

mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/$HOSTNAME.pid --socket=/var/lib/mysql/mysql.sock --port=3306 &
 
mysqld_safe --datadir=/usr/local/mysql/var2 --pid-file=/usr/local/mysql/var2/$HOSTNAME.pid2 --socket=/tmp/mysql.sock2 --port=3308 &

mysqld_safe --datadir=/usr/local/mysql/var3 --pid-file=/usr/local/mysql/var2/$HOSTNAME.pid3 --socket=/tmp/mysql.sock3 --port=3309 &

Code:

netstat -ntpl | grep mysql
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                  LIS
tcp        0      0 0.0.0.0:3308                0.0.0.0:*                  LIS
tcp        0      0 0.0.0.0:3309                0.0.0.0:*                  LIS

I have also verified seperate instances are running using ps -eaf, but will spare you the output.


When I try to run them with the mysqld_multi I get:

Code:

mysqld_multi start 1-3 --verbose
WARNING: mysqld_safe is being used to start mysqld. In this case you may need to pass
"ledir=..." under groups [mysqldN] to mysqld_safe in order to find the actual mysqld binary.
ledir (library executable directory) should be the path to the wanted mysqld binary.

/etc/my.cnf
Code:

[mysqld_multi]
mysqld        =/usr/bin/mysqld_safe
mysqladmin    =/usr/bin/mysqladmin

[mysqld1]
port            = 3306
socket          = /var/lib/mysql/mysql.sock
skip-external-locking
key_buffer_size = 16K
max_allowed_packet = 1M
table_open_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 128K


[mysql2]
socket          =/tmp/mysql.sock2
port            =3308
pid-file        =/usr/local/mysql/var2/$HOSTNAME.pid2
datadir        =/usr/local/mysql/var2

[mysql3]
socket          =/tmp/mysql.sock3
port            =3309
pid-file        =/usr/local/mysql/var3/$HOSTNAME.pid3
datadir        =/usr/local/mysql/var3

any tips to help trouble shoot this or configuration pointers would be appreciated

vasile002 10-29-2011 05:29 AM

I believe the problem is that you missed the "d" letter from the 2nd and 3rd mysqld groups:
[mysqld2]
[mysqld3]

Please try that

jason.rohde 10-29-2011 08:18 AM

Quote:

Originally Posted by vasile002 (Post 4511119)
I believe the problem is that you missed the "d" letter from the 2nd and 3rd mysqld groups:
[mysqld2]
[mysqld3]

Please try that

Everything I read implied that the 'd' wasn't necessary, I tried it and get the same error..back to the drawing board.
I appreciate the help though


All times are GMT -5. The time now is 05:48 PM.