Dear all,
I configured this server machine to host some websites at work, and now am on leave for graduate study. Now, the new guy at my workplace just mistakenly broke the MySQL configuration of MySQL. He firstly changed the location of the database files location, which made MySQL stopped working. Now all I did was pointing the MySQL location back to its original place ('/var/mysql/'), and am trying to start up the MySQL server again using 'mysqld_safe'. However, the mysqld refused to start and gives error about the socket being not available.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
sh-3.2# mysqld_safe
Starting mysqld daemon with databases from /var/mysql
rm: /var/mysql/mysql.sock: is a directory
STOPPING server from pid file /var/mysql/{MYHOST}.local.pid
120301 16:52:42 mysqld ended
sh-3.2# more /var/mysql/{host_name}.err
120301 16:52:41 mysqld started
120301 16:52:41 [Warning] Setting lower_case_table_names=2 because file system for /var/mysql/ is case insensitive
InnoDB: The InnoDB memory heap has been disabled.
InnoDB: Mutex and rw_lock use GCC atomic builtins.
120301 16:52:41 InnoDB: Started; log sequence number 0 43675
120301 16:52:41 [ERROR] Can't start server : Bind on unix socket: Address already in use
120301 16:52:41 [ERROR] Do you already have another mysqld server running on socket: /var/mysql/mysql.sock ?
120301 16:52:41 [ERROR] Aborting
120301 16:52:41 InnoDB: Starting shutdown...
120301 16:52:42 InnoDB: Shutdown completed; log sequence number 0 43675
120301 16:52:42 [Note] /usr/libexec/mysqld: Shutdown complete
120301 16:52:42 mysqld ended
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
I checked the processes whether there could be another mysqld running somewhere but found nothing...
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
sh-3.2# ps -Al | grep -i "mysqld"
0 41319 41307 4006 0 31 0 2435116 464 - S+ ffffff8019f66180 ttys001 0:00.00 grep -i mysqld
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.
.
.
.
.
So I followed the instruction on the MySQL trouble shooting page and check the /etc/hosts. It seems that the localhost is configured properly and firewall allows 127.0.0.1 as well.
I do not know why MySQL fails to start up. Below is the log file showing that mysqld tried to automatically start up but failed.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
120308 18:01:17 [Warning] Setting lower_case_table_names=2 because file system for /Library/WebServer/Sites/{MY_HOST_NAME}/mysql/ is case insensitive
InnoDB: The InnoDB memory heap has been disabled.
InnoDB: Mutex and rw_lock use GCC atomic builtins.
120308 18:01:17 InnoDB: Started; log sequence number 0 43655
120308 18:01:17 [ERROR] Can't start server : Bind on unix socket: Address already in use
120308 18:01:17 [ERROR] Do you already have another mysqld server running on socket: /var/mysql/mysql.sock ?
120308 18:01:17 [ERROR] Aborting
120308 18:01:17 InnoDB: Starting shutdown...
120308 18:01:18 InnoDB: Shutdown completed; log sequence number 0 43655
120308 18:01:18 [Note] /usr/libexec/mysqld: Shutdown complete
120308 18:01:27 [Warning] Setting lower_case_table_names=2 because file system for /Library/WebServer/Sites/{MY_HOST_NAME}/mysql/ is case insensitive
InnoDB: The InnoDB memory heap has been disabled.
InnoDB: Mutex and rw_lock use GCC atomic builtins.
120308 18:01:28 InnoDB: Started; log sequence number 0 43655
120308 18:01:28 [ERROR] Can't start server : Bind on unix socket: Address already in use
120308 18:01:28 [ERROR] Do you already have another mysqld server running on socket: /var/mysql/mysql.sock ?
120308 18:01:28 [ERROR] Aborting
120308 18:01:28 InnoDB: Starting shutdown...
120308 18:01:29 InnoDB: Shutdown completed; log sequence number 0 43655
120308 18:01:29 [Note] /usr/libexec/mysqld: Shutdown complete
120308 18:01:38 [Warning] Setting lower_case_table_names=2 because file system for /Library/WebServer/Sites/{MY_HOST_NAME}/mysql/ is case insensitive
InnoDB: The InnoDB memory heap has been disabled.
InnoDB: Mutex and rw_lock use GCC atomic builtins.
120308 18:01:38 InnoDB: Started; log sequence number 0 43655
120308 18:01:38 [ERROR] Can't start server : Bind on unix socket: Address already in use
120308 18:01:38 [ERROR] Do you already have another mysqld server running on socket: /var/mysql/mysql.sock ?
120308 18:01:38 [ERROR] Aborting
120308 18:01:38 InnoDB: Starting shutdown...
120308 18:01:39 InnoDB: Shutdown completed; log sequence number 0 43655
120308 18:01:39 [Note] /usr/libexec/mysqld: Shutdown complete
120308 18:01:48 [Warning] Setting lower_case_table_names=2 because file system for /Library/WebServer/Sites/{MY_HOST_NAME}/mysql/ is case insensitive
InnoDB: The InnoDB memory heap has been disabled.
InnoDB: Mutex and rw_lock use GCC atomic builtins.
120308 18:01:48 InnoDB: Started; log sequence number 0 43655
120308 18:01:48 [ERROR] Can't start server : Bind on unix socket: Address already in use
120308 18:01:48 [ERROR] Do you already have another mysqld server running on socket: /var/mysql/mysql.sock ?
120308 18:01:48 [ERROR] Aborting
120308 18:01:48 InnoDB: Starting shutdown...
120308 18:01:50 InnoDB: Shutdown completed; log sequence number 0 43655
120308 18:01:50 [Note] /usr/libexec/mysqld: Shutdown complete
120308 18:01:59 [Warning] Setting lower_case_table_names=2 because file system for /Library/WebServer/Sites/{MY_HOST_NAME}/mysql/ is case insensitive
InnoDB: The InnoDB memory heap has been disabled.
InnoDB: Mutex and rw_lock use GCC atomic builtins.
120308 18:01:59 InnoDB: Started; log sequence number 0 43655
120308 18:01:59 [ERROR] Can't start server : Bind on unix socket: Address already in use
120308 18:01:59 [ERROR] Do you already have another mysqld server running on socket: /var/mysql/mysql.sock ?
120308 18:01:59 [ERROR] Aborting
120308 18:01:59 InnoDB: Starting shutdown...
120308 18:02:00 InnoDB: Shutdown completed; log sequence number 0 43655
120308 18:02:00 [Note] /usr/libexec/mysqld: Shutdown complete
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
What could be wrong here?
I configured this server machine to host some websites at work, and now am on leave for graduate study. Now, the new guy at my workplace just mistakenly broke the MySQL configuration of MySQL. He firstly changed the location of the database files location, which made MySQL stopped working. Now all I did was pointing the MySQL location back to its original place ('/var/mysql/'), and am trying to start up the MySQL server again using 'mysqld_safe'. However, the mysqld refused to start and gives error about the socket being not available.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
sh-3.2# mysqld_safe
Starting mysqld daemon with databases from /var/mysql
rm: /var/mysql/mysql.sock: is a directory
STOPPING server from pid file /var/mysql/{MYHOST}.local.pid
120301 16:52:42 mysqld ended
sh-3.2# more /var/mysql/{host_name}.err
120301 16:52:41 mysqld started
120301 16:52:41 [Warning] Setting lower_case_table_names=2 because file system for /var/mysql/ is case insensitive
InnoDB: The InnoDB memory heap has been disabled.
InnoDB: Mutex and rw_lock use GCC atomic builtins.
120301 16:52:41 InnoDB: Started; log sequence number 0 43675
120301 16:52:41 [ERROR] Can't start server : Bind on unix socket: Address already in use
120301 16:52:41 [ERROR] Do you already have another mysqld server running on socket: /var/mysql/mysql.sock ?
120301 16:52:41 [ERROR] Aborting
120301 16:52:41 InnoDB: Starting shutdown...
120301 16:52:42 InnoDB: Shutdown completed; log sequence number 0 43675
120301 16:52:42 [Note] /usr/libexec/mysqld: Shutdown complete
120301 16:52:42 mysqld ended
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
I checked the processes whether there could be another mysqld running somewhere but found nothing...
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
sh-3.2# ps -Al | grep -i "mysqld"
0 41319 41307 4006 0 31 0 2435116 464 - S+ ffffff8019f66180 ttys001 0:00.00 grep -i mysqld
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.
.
.
.
.
So I followed the instruction on the MySQL trouble shooting page and check the /etc/hosts. It seems that the localhost is configured properly and firewall allows 127.0.0.1 as well.
I do not know why MySQL fails to start up. Below is the log file showing that mysqld tried to automatically start up but failed.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
120308 18:01:17 [Warning] Setting lower_case_table_names=2 because file system for /Library/WebServer/Sites/{MY_HOST_NAME}/mysql/ is case insensitive
InnoDB: The InnoDB memory heap has been disabled.
InnoDB: Mutex and rw_lock use GCC atomic builtins.
120308 18:01:17 InnoDB: Started; log sequence number 0 43655
120308 18:01:17 [ERROR] Can't start server : Bind on unix socket: Address already in use
120308 18:01:17 [ERROR] Do you already have another mysqld server running on socket: /var/mysql/mysql.sock ?
120308 18:01:17 [ERROR] Aborting
120308 18:01:17 InnoDB: Starting shutdown...
120308 18:01:18 InnoDB: Shutdown completed; log sequence number 0 43655
120308 18:01:18 [Note] /usr/libexec/mysqld: Shutdown complete
120308 18:01:27 [Warning] Setting lower_case_table_names=2 because file system for /Library/WebServer/Sites/{MY_HOST_NAME}/mysql/ is case insensitive
InnoDB: The InnoDB memory heap has been disabled.
InnoDB: Mutex and rw_lock use GCC atomic builtins.
120308 18:01:28 InnoDB: Started; log sequence number 0 43655
120308 18:01:28 [ERROR] Can't start server : Bind on unix socket: Address already in use
120308 18:01:28 [ERROR] Do you already have another mysqld server running on socket: /var/mysql/mysql.sock ?
120308 18:01:28 [ERROR] Aborting
120308 18:01:28 InnoDB: Starting shutdown...
120308 18:01:29 InnoDB: Shutdown completed; log sequence number 0 43655
120308 18:01:29 [Note] /usr/libexec/mysqld: Shutdown complete
120308 18:01:38 [Warning] Setting lower_case_table_names=2 because file system for /Library/WebServer/Sites/{MY_HOST_NAME}/mysql/ is case insensitive
InnoDB: The InnoDB memory heap has been disabled.
InnoDB: Mutex and rw_lock use GCC atomic builtins.
120308 18:01:38 InnoDB: Started; log sequence number 0 43655
120308 18:01:38 [ERROR] Can't start server : Bind on unix socket: Address already in use
120308 18:01:38 [ERROR] Do you already have another mysqld server running on socket: /var/mysql/mysql.sock ?
120308 18:01:38 [ERROR] Aborting
120308 18:01:38 InnoDB: Starting shutdown...
120308 18:01:39 InnoDB: Shutdown completed; log sequence number 0 43655
120308 18:01:39 [Note] /usr/libexec/mysqld: Shutdown complete
120308 18:01:48 [Warning] Setting lower_case_table_names=2 because file system for /Library/WebServer/Sites/{MY_HOST_NAME}/mysql/ is case insensitive
InnoDB: The InnoDB memory heap has been disabled.
InnoDB: Mutex and rw_lock use GCC atomic builtins.
120308 18:01:48 InnoDB: Started; log sequence number 0 43655
120308 18:01:48 [ERROR] Can't start server : Bind on unix socket: Address already in use
120308 18:01:48 [ERROR] Do you already have another mysqld server running on socket: /var/mysql/mysql.sock ?
120308 18:01:48 [ERROR] Aborting
120308 18:01:48 InnoDB: Starting shutdown...
120308 18:01:50 InnoDB: Shutdown completed; log sequence number 0 43655
120308 18:01:50 [Note] /usr/libexec/mysqld: Shutdown complete
120308 18:01:59 [Warning] Setting lower_case_table_names=2 because file system for /Library/WebServer/Sites/{MY_HOST_NAME}/mysql/ is case insensitive
InnoDB: The InnoDB memory heap has been disabled.
InnoDB: Mutex and rw_lock use GCC atomic builtins.
120308 18:01:59 InnoDB: Started; log sequence number 0 43655
120308 18:01:59 [ERROR] Can't start server : Bind on unix socket: Address already in use
120308 18:01:59 [ERROR] Do you already have another mysqld server running on socket: /var/mysql/mysql.sock ?
120308 18:01:59 [ERROR] Aborting
120308 18:01:59 InnoDB: Starting shutdown...
120308 18:02:00 InnoDB: Shutdown completed; log sequence number 0 43655
120308 18:02:00 [Note] /usr/libexec/mysqld: Shutdown complete
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
What could be wrong here?