Super User is a question and answer site for computer enthusiasts and power users. 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 have done the following:

shell> sudo apt-get install mysql-server-core-5.1
shell> sudo apt-get install mysql-client-core-5.1

Both seemed to complete fine with no errors. I have the following present:


However if I try to run this, I get the following error:

mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 2)

for the simple reason that in fact this directory does not exist. Now the correct way to start the daemon is apparently:

/etc/init.d/mysql start

however this script does not seem to exist either. So has my install totally messed up, or is there a step I am missing?


share|improve this question
up vote 5 down vote accepted

Try installing the packages mysql-client and mysql-server instead.

sudo apt-get install mysql-client mysql-server
share|improve this answer
yes, all you need to do is mysql-server and everything is set up. thanks – Richard100 Aug 7 '10 at 16:19

Put sudo before running /usr/sbin/mysqld command.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .