Bug #1678 first mysql.sock disapears with multiple servers
Submitted: 27 Oct 2003 10:58 Modified: 13 Dec 2003 9:02
Reporter: Joao Neves Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0.16 OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[27 Oct 2003 10:58] Joao Neves
Description:
I use three independent servers on the same machine for different tasks. The primary server uses /tmp/mysql.sock and the second and third servers use /tmp/mysql.sock2 and /tmp/mysql.sock3, respectively. After I upgraded from 4.0.14 to 4.0.16, the socket for the primary server disapears as soon as the second server starts, but the server itself continues to run correctly if you connect remotely. When using only one server, everything seems to be ok. If I add "socket = /tmp/mysql.sock1" to the my.cnf entry for server #1, everything also works fine.

How to repeat:
Start multiple servers using "mysqld_multi start". The sockets for servers #2 and greater will be ok, but the default socket (/tmp/mysql.sock) will disapear and "mysqld_multi report" will incorrectly think server #1 is down.

or

Start the first server using "mysqld_multi start 1" and it works fine, with the socket in place. Then start the second server using "mysqld_multi start 2" and the socket to the first server disapears, but the server is still running ok.
[27 Oct 2003 20:00] Dean Ellis
I am unable to duplicate this with the latest version of MySQL 4.0.

Paste your [mysqld_multi] and [mysqld#] groups if you would like further testing on this.  If you are not doing so already, set mysqld to point to your actual mysqld binary in [mysqld_multi] and see if the problem persists.

Thank you
[28 Oct 2003 6:14] Joao Neves
I set mysqld to point to the actual mysqld binary in [mysqld_multi] and it worked ok. Should I stop using mysqld_safe in my production servers? Thanks and congratulations on the great work!
[13 Nov 2003 8:53] Joao Neves
After a lot of looking around a found that I hadn't set the server-id in each of the [mysqld?] entries in my.cnf. Now that the server-ids are set everything works fine. My mistake!
[13 Nov 2003 9:02] Joao Neves
OOPS!  I just stopped and started the server and the /tmp/mysql.sock file disappeared again. Here is my my.cnf:

[mysqld_multi]
  mysqld          = /usr/local/mysql/bin/safe_mysqld
  mysqladmin      = /usr/local/mysql/bin/mysqladmin
  user            = multi_admin
  password        = *******
  log             = /var/log/mysqld_multi

[safe_mysqld]
   open-files-limit = 4096

[mysqld1]
  port            = 3306
  socket          = /tmp/mysql.sock
  datadir         = /usr/local/mysql/var
  user            = mysql
  set-variable    = wait_timeout=907
  set-variable    = interactive_timeout=900
  set-variable    = open_files_limit=4096
  server-id       = 1
  skip-innodb

[mysqld2]
  port            = 3307
  socket          = /tmp/mysql.sock2
  datadir         = /usr/local/mysql/var-backup-brazza
  user            = mysql
  master-host     = brazza-backup.********.com
  master-user     = sql_repl
  master-password = ********
  master-port     = 3306
  server-id       = 2
  set-variable    = net_read_timeout=60
  set-variable    = open_files_limit=4096
  set-variable    = max_allowed_packet=16M
  skip-innodb
  slave-skip-errors = 4294967295

[mysqld3]
  port            = 3308
  socket          = /tmp/mysql.sock3
  datadir         = /usr/local/mysql/var-teste
  user            = mysql
  set-variable    = wait_timeout=907
  set-variable    = interactive_timeout=900
  set-variable    = open_files_limit=4096
  server-id       = 3
  innodb_data_home_dir  =
  innodb_data_file_path = /dados07/mysql_var/innodb/ibdata1:37000M
  innodb_log_group_home_dir = /dados04/mysql_var/innodb/
  innodb_log_arch_dir = /dados04/mysql_var/innodb/
  set-variable          = innodb_buffer_pool_size=512M
  set-variable          = innodb_additional_mem_pool_size=10M
  set-variable          = innodb_log_file_size=75M
  set-variable          = innodb_log_buffer_size=8M
  innodb_flush_log_at_trx_commit = 1
  set-variable = innodb_lock_wait_timeout=50
  skip-locking
  set-variable = max_connections=200
  set-variable = read_buffer_size=1M
  set-variable = sort_buffer=1M
[14 Feb 2005 22:54] 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".