Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I can’t start MySQL on Ubuntu 12.04 after restored backup from innobackupex.

Before I tried to restore the db from backup I moved the datadir and got the same problem. With help from google I fixed the problem and got MySQL started.

Ready to set up my new slave, I restored the backup via innobackupex –-copy-path /db/mysql, and now I can’t start MySQL.

I am sure of the following:

In my.cnf the datadir = /db/mysql

The new datadir is chown mysql:mysql.

The /etc/apparmor.d/usr.sbin.mysqld contains:

  #/var/lib/mysql/ r,
  #/var/lib/mysql/** rwk,
  /db/mysql r,
  /db/mysql** rwk,

AND

  /var/run/mysqld/mysqld.pid w,
  /var/run/mysqld/mysqld.sock w,
  /run/mysqld/mysqld.pid w,
  /run/mysqld/mysqld.sock w,

/var/log/syslog gives me the following info:

http://pastebin.com/1TQGsaBH

sudo /etc/init.d/mysql start gives me:

start: Job failed to start

Nothing gets printet to /var/log/mysql/mysql.err

mysql -V: mysql Ver 14.14 Distrib 5.5.24, for debian-linux-gnu (x86_64) using readline 6.2

mysqld_safe gives me this:

121017 15:19:16 mysqld_safe Logging to syslog.
121017 15:19:16 mysqld_safe Starting mysqld daemon with databases from /db/mysql
121017 15:19:16 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

What am I missing?

Thanks.

share|improve this question
    
What does mysql say on startup? I imagine it gives an error message? You may want to start it manually from console to get at the message; some of the fatal error messages seem not to get logged, but instead get printed to stderr (at least in 5.1). –  Bittrance Oct 17 '12 at 11:32
    
Hi Bittrance, sudo /etc/init.d/mysql start gives me this; start: Job failed to start. /var/log/mysql/mysql.err gives me nothing. I'll update the original post with this info. –  RAH Oct 17 '12 at 12:01
    
could you please try to start the MySQL by hand, using mysqld_safe and provide the output. –  Thomas Berger Oct 17 '12 at 12:37
    
Hi Mr. Berger, I have updated the original post with the output from mysqld_safe. Thanks. –  RAH Oct 17 '12 at 13:19
    
You might be hit by the same issue as which I posted an answer for here. It has to do with the init script interacting with the server using credentials from /etc/mysql/debian.cnf which you need to copy from the master. –  gertvdijk Dec 15 '12 at 0:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.