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

Googling since two hours, I require your assistance. I'm on a Debian virtual machine and I cloned it. The only change is the new IP adress it has.

Mysql doesn't start any more:

Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!

There is no process called mysql. All the mysql log files in /var/log are empty.

here is my.cnf file :

port        = 3306
socket      = /var/run/mysqld/mysqld.sock
socket      = /var/run/mysqld/mysqld.sock
nice        = 0

user        = mysql
pid-file    = /var/run/mysqld/
socket      = /var/run/mysqld/mysqld.sock
port        = 3306
basedir     = /usr
datadir     = /var/lib/mysql
tmpdir      = /tmp
language    = /usr/share/mysql/english
bind-address        =
key_buffer      = 16M
max_allowed_packet  = 16M
thread_stack        = 192K
thread_cache_size       = 8
myisam-recover         = BACKUP
query_cache_limit   = 1M
query_cache_size        = 16M
general_log_file        = /var/log/mysql/mysql.log
log_bin         = /var/log/mysql/mysql-bin.log
expire_logs_days    = 10
max_binlog_size         = 100M

max_allowed_packet  = 16M
key_buffer      = 16M

Here is the result of ifconfig :

eth0      Link encap:Ethernet  HWaddr 00:0c:29:12:98:9a  
          inet adr:  Bcast:  Masque:
          RX packets:754 errors:0 dropped:0 overruns:0 frame:0
          TX packets:106 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000 
          RX bytes:101177 (98.8 KiB)  TX bytes:17719 (17.3 KiB)

lo        Link encap:Boucle locale  
          inet adr:  Masque:
          adr inet6: ::1/128 Scope:Hôte
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:0 
          RX bytes:560 (560.0 B)  TX bytes:560 (560.0 B)

As requested, here is the result of : sudo -u mysql mysqld, here is the result :

root@debian:/home/nicolas/Bureau# sudo -u mysql mysqld
121004 14:26:57 [Note] Plugin 'FEDERATED' is disabled.
mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
121004 14:26:57 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
121004 14:26:57  InnoDB: Initializing buffer pool, size = 8.0M
121004 14:26:57  InnoDB: Completed initialization of buffer pool
121004 14:26:57  InnoDB: Started; log sequence number 0 70822697
121004 14:26:57 [Note] Recovering after a crash using /var/log/mysql/mysql-bin
121004 14:26:57 [Note] Starting crash recovery...
121004 14:26:57 [Note] Crash recovery finished.
121004 14:26:57 [ERROR] mysqld: Can't find file: './mysql/host.frm' (errno: 13)
121004 14:26:57 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
share|improve this question
Anything interesting in the logs /var/log/mysql.err /var/log/mysql/* ? – Iain Oct 3 '12 at 11:22
You might wanna run mysql by running mysqld and show if it outputs something while starting. – miccet Oct 3 '12 at 12:11
I posted the log of mysqld ... – Nicolas Thery Oct 5 '12 at 15:24
Make sure your my.cnf config file and the location of your mysql var directory agree. Last time I saw this was when a MySQL upgrade had a different default for the MySQL instead of /var/lib/mysql. – Magellan Oct 6 '12 at 21:47

Possible that permissions on /var/lib/mysql are wrong, or DB structure is not initialized. Try to run mysql manually:

#sudo -u mysql mysqld

And you will get all daemon's output on console.

share|improve this answer
I get the same result as mysqld, this is not a right matter :( – Nicolas Thery Oct 6 '12 at 21:11

So this is the error for 13

$ perror 13 OS error code 13: Permission denied

So I want you to try the following

First make sure permissions is ok

chown -R mysql: /var/lib/mysql

Then try to start mysql. If it doesn't work and you don't care about any of your data do the following

rm -rf /var/lib/mysql/*
chown -R mysql: /var/lib/mysql

Then start mysql up again

share|improve this answer
I have my database in that folder, i dont want to loose these data – Nicolas Thery Oct 5 '12 at 15:23
so just do the chown -R mysql: /var/lib/mysql and try to start it – Mike Oct 5 '12 at 15:55
I get the same result after a chown, the rights were already to mysql – Nicolas Thery Oct 6 '12 at 21:14
do you possibly have appamor running that is not letting the process read/write to that directory? – Mike Oct 8 '12 at 2:58
Its a new debian with only some packages installed (php Apache mysql chrome emacs) – Nicolas Thery Oct 9 '12 at 7:41
up vote 0 down vote accepted

As i couldn't since it I reinstalled a new VM Thank you for your help that was good ideas

share|improve this answer

I had the same problem.

The /tmp dir was not writbale, so MYSQL couldn't write some needed file.

Just do this :

chmod 777 /tmp

and restart mysql

/etc/init.d/mysql start
share|improve this answer

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.