Bug #8279 mysqld_multi doesn't read my.cnf
Submitted: 3 Feb 2005 9:12 Modified: 4 May 2006 16:30
Reporter: Shuichi Tamagawa Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:All OS:Linux (SuSE Linux 9.2 (kernel 2.6))
Assigned to: CPU Architecture:Any

[3 Feb 2005 9:12] Shuichi Tamagawa
Description:
mysqld_multi doesn't read the [mysqld#] group of my.cnf. As a result, multiple servers cannot be run on a same server using mysqld_multi.

We I was using SuSE Linux 9.0 (kernel 2.4), it was OK by using the same configuration and same procedure.

How to repeat:
1.Install different version of MySQL to the path like:
/usr/local/mysql/41090/
/usr/local/mysql/50020/

2.Create a group in my.cnf file like below:
--------------------------------------------------------------------
[mysqld41090]
basedir = /usr/local/mysql/41090
datadir = /usr/local/mysql/41090/data
pid-file = /usr/local/mysql/41090/data/linux.pid
mysqld = /usr/local/mysql/41090/bin/mysqld
socket = /usr/local/mysql/41090/mysql.sock
port = 41090

[mysqld50020]
basedir = /usr/local/mysql/50020
datadir = /usr/local/mysql/50020/data
pid-file = /usr/local/mysql/50020/data/linux.pid
mysqld = /usr/local/mysql/50020/libexec/mysqld
socket = /usr/local/mysql/50020/mysql.sock
port = 50020
--------------------------------------------------------------------

3.Copy /usr/local/mysql/41090/bin/  to  /usr/local/mysql/bin/

4.Execute mysqld_multi:
/usr/local/mysql/bin/mysqld_multi --no-log start 41090,50030

mysql@mysql:/usr/local/mysql/bin> ./mysqld_multi --no-log start 41090,50020
WARNING: Log file disabled. Maybe directory or file isn't writable?
mysqld_multi log file version 2.11; run: 木  2月  3 18:04:24 2005

Starting MySQL servers
mysql@mysql:/usr/local/mysql/bin> 050203 18:04:24 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
050203 18:04:24 [ERROR] Do you already have another mysqld server running on port: 3306 ?
050203 18:04:24 [ERROR] Aborting

050203 18:04:24 [Note] /usr/local/mysql/41090/libexec/mysqld: Shutdown complete

050203 18:04:25  InnoDB: Started; log sequence number 0 43634
/usr/local/mysql/41090/libexec/mysqld: ready for connections.
Version: '4.1.9-debug'  socket: '/usr/local/mysql/41090/mysql.sock'  port: 3306  Source distribution

mysqld is launched from the same place using the same port.

Suggested fix:
Make mysqld read the group in the my.cnf file specified by mysqld_multi command.
[4 Feb 2005 13:12] MySQL Verification Team
I wan't able reproduce it on my linux box.
Seems this is SuSe-specific issue.
[26 Apr 2005 15:00] Jani Tolonen
Tested on SuSE 9.2, works.

This could be due to another my.cnf file disturbing.
Where is the config file of the example being saved in, and with which name?
Are there any other my.cnf files in:
/etc/my.cnf
~/.my.cnf
or if you have MYSQL_HOME environment variable set, in that location?
Check with echo $MYSQL_HOME.
[5 May 2005 0:02] Shuichi Tamagawa
Hi,

>Where is the config file of the example being saved in, and with which name? 
There are my-huge.cnf, my-innodb-heavy-4G.cnf, my-large.cnf, my-medium.cnf, my-small.cnf in /usr/local/mysql/50020/share/mysql/ and  /usr/local/mysql/50020/share/mysql/.

>Are there any other my.cnf files in: /etc/my.cnf ~/.my.cnf 

 But no my.cnf other than the one in /etc/my.cnf

>if you have MYSQL_HOME environment variable set, in that location? Check with echo $MYSQL_HOME.

echo $MYSQL_HOME returns nothing.
[5 Jun 2005 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[20 Jul 2005 3:42] MySQL Verification Team
Verified on Suse 9.3:

miguel@hegel:/usr/local/mysql/bin> ./mysqld_multi --no-log start 41090,50020
mysqld_multi log file version 2.11; run: Wed Jul 20 00:38:08 2005

Starting MySQL servers
miguel@hegel:/usr/local/mysql/bin> 050720  0:38:08 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
050720  0:38:08 [ERROR] Do you already have another mysqld server running on port: 3306 ?
050720  0:38:08 [ERROR] Aborting

050720  0:38:08 [Note] /usr/local/mysql/41090/libexec/mysqld: Shutdown complete

InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
050720  0:38:08  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
050720  0:38:09  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
050720  0:38:09  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
050720  0:38:10  InnoDB: Started; log sequence number 0 0
/usr/local/mysql/41090/libexec/mysqld: ready for connections.
Version: '4.1.14-debug'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
[4 May 2006 16:30] MySQL Verification Team
I was unable to repeat this issue anymore in Suse Linux 10:

060505 13:31:07 [Note] /usr/local/mysql/5.0/libexec/mysqld: ready for connections.
Version: '5.0.22-debug'  socket: '/usr/local/mysql/5.0/mysql.sock'  port: 50020  Source distribution
/usr/local/mysql/4.1/bin/mysqld: ready for connections.
Version: '4.1.19-debug'  socket: '/usr/local/mysql/4.1/mysql.sock'  port: 41090  Source distribution