-3

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 .

1 Answers1

1

umount, chkfs ?

mount -rw

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

Korjavin Ivan
  • 2,250
  • 2
  • 26
  • 41
  • Please check my NOTE and if possible answer to the file system error [THERE](http://unix.stackexchange.com/questions/46628/not-able-to-lock-var-lib-dpkg-lock-read-only) and after that please help me with this here . Thanks – Subhransu Mishra Aug 30 '12 at 04:49
  • You need no help HERE. After fix read only, mysql will work. – Korjavin Ivan Aug 30 '12 at 08:11