Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was updating 'mysql-server' with apt-get on the server of my employer last Saturday. Sadly, something went wrong and MySQL didn't install right. I heard that this happens sometimes with apt-get.

I followed some advice from Stackoverflow and some other stuff, but now I'm in even deeper. After I uninstalled MySQL with dkpg, I reinstalled it with apt-get. Apt-get says it's installed now, but I have no /etc/init.d/mysql(d) to start MySQL and the socket in /tmp/MySQL.sock isn't created.

Any suggestions would be greatly appreciated, as the site needs to go live asap, the original planning was last Thursday.

On a related question: I think I just removed the binaries with --purge, that's true, right? It would be quite a disaster if the databases were gone.

EDIT: With the help of some people at the data center, we got this fixed. Thanks for the help sledge.

share|improve this question

The databases are kept in /var/lib/mysql on debian based systems. Check there to ensure that your databases still exist.

Which packages did you install? You must install mysql-server in order to get the daemon. Just mysql or mysql-client will not work.

share|improve this answer
I just checked that folder, and I still have the databases. I installed mysql-server. – Tim van Dalen Dec 6 '10 at 18:26
Did it work? You should have mysqld now. – sledge Dec 6 '10 at 18:40
No, that's the problem. I got some rc/ir's from dpkg -l | grep mysql, so I reinstalled those packaged. However, on installation of mysql-server-5.1, I get the error that /etc/init.d/mysql does not exist. – Tim van Dalen Dec 6 '10 at 18:51
Then update your RC configuration to have it launch on startup. rcconf is a good tool for that. – sledge Dec 6 '10 at 18:58
There is no mention of anything mysql related in rcconf – Tim van Dalen Dec 6 '10 at 19:11

Your Answer


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.