Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to recover my mysql root password so I have followed this tutorial and stopped the mysql server . when I am trying to start it its show a error message and won't start. I believe the error is due to read only file system.

  1. Is their any other way of restarting the mysql server
root@web01:/home/# /etc/init.d/mysql stop
Stopping MySQL database server: mysqld




^Z
[2]+  Stopped                 /etc/init.d/mysql stop
root@web01:/home/# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
root@web01:/home/# 
root@web01:/home/# mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
root@web01:/home/# mysqld_safe --skip-grant-tables &
[3] 7784
root@web01:/home/# 120830 08:20:56 mysqld_safe Logging to syslog.
rm: cannot remove `/var/run/mysqld/mysqld.pid': Read-only file system
120830 08:20:57 mysqld_safe Fatal error: Can't remove the pid file:
/var/run/mysqld/mysqld.pid
Please remove it manually and start /usr/bin/mysqld_safe again;
mysqld daemon not started

[3]   Exit 1                  mysqld_safe --skip-grant-tables
root@web01:/home/# mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
root@web01:/home/# /etc/init.d/mysqld start
bash: /etc/init.d/mysqld: No such file or directory
root@web01:/home# /etc/init.d/mysql start
Starting MySQL database server: mysqld . .
 . . . . . . . . . . . . failed!
root@web01:/home# 
root@web01:/home# /etc/init.d/mysql start
Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
root@web01:/home# /etc/init.d/mysql restart
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
root@web01:/home# ^C
root@web01:/home#

NOTE: I am facing the readonly file system error which I have asked here .

share|improve this question
add comment

1 Answer

umount, chkfs ?

mount -rw

First of all solve problem with filesystem, and start mysql only after that

share|improve this answer
    
Please check my NOTE and if possible answer to the file system error THERE and after that please help me with this here . Thanks –  Subhransu Aug 30 '12 at 4:49
    
You need no help HERE. After fix read only, mysql will work. –  Korjavin Ivan Aug 30 '12 at 8:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.