Cannot stop restart MySQL

phuongdzu

Verified User
Joined
Jul 24, 2013
Messages
26
# /etc/init.d/mysqld stop
Stopping mysqld: [ FAILED ]

# /etc/init.d/mysqld restart
Stopping mysqld: [ FAILED ]
_
Must Enter and show:
mysqld is already running. /tmp/mysql.sock exists

Login Direct Admin http://xxx.xxx.xxx.xxx:2222/CMD_SHOW_SERVICES see:
mysqld Process is stopped 0 B Start Stop

I try as: http://help.directadmin.com/item.php?id=332

# ls -la /var/lib/mysql/mysql.sock
-rw-r--r-- 1 root root 0 2013-07-25 04:39 /var/lib/mysql/mysql.sock

# netstat -lnp | grep mysql
No message

# ps ax | grep mysql
3822 pts/0 R+ 0:00 grep --color=auto mysql

# /etc/init.d/mysqld stop
Stopping mysqld: [ FAILED ]

# /etc/init.d/mysqld start
mysqld is already running. /tmp/mysql.sock exists

But Login Direct Admin http://xxx.xxx.xxx.xxx:2222/CMD_SHOW_SERVICES see:
mysqld Process is stopped 0 B Start Stop
My website get error message: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (13)

Continue:
# killall -9 mysqld mysqld_safe
mysqld: no process found
mysqld_safe: no process found

I searched on directadmin forum and tried many ways but cannot solve problem.

Please help
 
Have you checked mysql log?

Check in /var/lib/mysql/ you should have a file called HOSTNAME.log (hostname is ofc your server name).

Regards
 
Hi again,

errors seems to be those:

Code:
130722 18:53:42  InnoDB: Unable to open the first data file
InnoDB: Error in opening ./ibdata1
130722 18:53:42  InnoDB: Operating system error number 11 in a file operation.
InnoDB: Error number 11 means 'Resource temporarily unavailable'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html
130722 18:53:42 InnoDB: Could not open or create data files.
130722 18:53:42 InnoDB: If you tried to add new data files, and it failed here,
130722 18:53:42 InnoDB: you should now edit innodb_data_file_path in my.cnf back
130722 18:53:42 InnoDB: to what it was, and remove the new ibdata files InnoDB created
130722 18:53:42 InnoDB: in this failed attempt. InnoDB only wrote those files full of
130722 18:53:42 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
130722 18:53:42 InnoDB: remove old data files which contain your precious data!
130722 18:53:42 [ERROR] Plugin 'InnoDB' init function returned error.
130722 18:53:42 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
130722 18:53:42 [ERROR] Unknown/unsupported storage engine: InnoDB
130722 18:53:42 [ERROR] Aborting

Have you removed ibdata1 file?

Regards
 
Have you removed ibdata1 file?

Regards
Hello

I just rename ibdata1 to ibdata1.000

# /etc/init.d/mysqld stop
Stopping mysqld: [ FAILED ]

# /etc/init.d/mysqld start
mysqld is already running. /tmp/mysql.sock exists

But my websites are still error
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (13)
 
Have you tried cmpletely uninstalling MySQL (both through OS and DirectAdmin; in case it's installed in both places), and then reinstalling?

Jeff
 
Have you tried cmpletely uninstalling MySQL (both through OS and DirectAdmin; in case it's installed in both places), and then reinstalling?

Jeff

I was worried that would lost databases if uninstall.
Can I keep curent database if tried uninstall and reinstall?
 
Rather than answer directly just let me point out that you should have backups of your files anyway, in case you need them. If you don't have current backups of your MySQL databases, make them first.

Jeff
 
Back
Top