Restart mysql keeping the data
Posted
by
sitonico
on Server Fault
See other posts from Server Fault
or by sitonico
Published on 2011-02-15T13:15:46Z
Indexed on
2012/06/17
15:18 UTC
Read the original article
Hit count: 452
mysql
|phpmyadmin
I'm quite new using mysql, so let me know if I'm missing something. I took some holidays, and when I got back to work and I tried to log in phpmyadmin I got a ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2).
I never had this problem, so I was browsing to look for a solution. I tried some things, and I'm afraid I touched too much. I couldn't solve the problem, and the I realized that I had some actualizations to be done, and I thought that they may be helpful for mysql. Then I also realized that when I was doing this actualizations first day, they stopped because I had a lack of space, so I restarted then. Then,when the system was configuring mysql, it didn't advance. I waited for a long time and then I just stopped it and restarted the computer. After it, I just tried to uninstall mysql with sudo apt-get remove mysql-server-5.1, and install it again, but it didn't work. Now I have 2 questions:
- What do you think it is happening? Should I remove mysql completely? What should I do?
- I'm afraid of losing my databases, is there anyway to recover the data?
Thank you very much in advance.
-----------EDIT-------
These are the messages:
alfonso@alfonso-laptop:/$ tail -F /var/log/syslog | grep
Feb 15 15:08:01 alfonso-laptop init: mysql post-start process (15192) terminated with status
Feb 15 15:08:01 alfonso-laptop init: mysql main process (15263) terminated with status
Feb 15 15:08:01 alfonso-laptop init: mysql main process ended,
Feb 15 15:08:31 alfonso-laptop init: mysql post-start process (15264) terminated with status
Feb 15 15:08:31 alfonso-laptop init: mysql main process (15358) terminated with status
Feb 15 15:08:31 alfonso-laptop init: mysql main process ended,
Feb 15 15:09:01 alfonso-laptop init: mysql post-start process (15359) terminated with status
Feb 15 15:09:01 alfonso-laptop init: mysql main process (15447) terminated with status
Feb 15 15:09:01 alfonso-laptop init: mysql main process ended,
Feb 15 15:09:32 alfonso-laptop init: mysql post-start process (15448) terminated with status 1
This is the content of error.log-old
110128 13:17:20 [Note] /usr/sbin/mysqld: Normal shutdown
110128 13:17:20 [Note] Event Scheduler: Purging the queue. 0 events
110128 13:17:20 InnoDB: Starting shutdown...
110128 13:17:22 InnoDB: Shutdown completed; log sequence number 0 590872
110128 13:17:22 [Note] /usr/sbin/mysqld: Shutdown complete
110214 2:08:18 [Note] Plugin 'FEDERATED' is disabled.
110214 2:08:19 InnoDB: Started; log sequence number 0 590872
110214 2:08:19 [Note] Event Scheduler: Loaded 0 events
110214 2:08:19 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.41-3ubuntu12.8' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
--> Some links of similar problems
- https://bugs.launchpad.net/ubuntu/+source/mysql-dfsg-5.1/+bug/573318
- http://www.linuxquestions.org/questions/linux-newbie-8/lamp-install-on-lucid-mysqld-sock-missing-mysql-terminating-status%3D1-853152/
It seems it's a permissions problem... But I don't know which permissions I should change...
SOLVED --> mysql error 2002 "cannot connect to socket"
© Server Fault or respective owner