I am setting up a backup server for an already existing Ubuntu server setup.
I'm running DRBD (protocol C) together with heartbeat, which is configured so that in case of an error the MySQL5 Server on the backup server starts.
I want to start the mysql server after replication using drbd and heartbeat.
I changed the datadir in my.cnf
file and in apparmor.d/usr.bin.mysqld also.
Mysql starts when drbd device is not mounted.
My logs shows as follows:
Oct 26 12:55:28 twyford-hambc2 mysqld[27627]: 101026 12:55:28 InnoDB: Operating system error number 13 in a file operation.
Oct 26 12:55:28 twyford-hambc2 mysqld[27627]: InnoDB: The error means mysqld does not have the access rights to
Oct 26 12:55:28 twyford-hambc2 mysqld[27627]: InnoDB: the directory.
Oct 26 12:55:28 twyford-hambc2 mysqld[27627]: InnoDB: File name ./ibdata1
Oct 26 12:55:28 twyford-hambc2 mysqld[27627]: InnoDB: File operation call: 'open'.
Oct 26 12:55:28 twyford-hambc2 mysqld[27627]: InnoDB: Cannot continue operation.
Oct 26 12:55:28 twyford-hambc2 mysqld_safe[27634]: ended
Oct 26 12:55:42 twyford-hambc2 kernel: [ 2876.791880] type=1503 audit(1288094142.991:53: operation="inode_permission" requested_mask="::r" denied_mask="::r" fsuid=0 $
Oct 26 12:55:42 twyford-hambc2 /etc/init.d/mysql[27799]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Oct 26 12:55:42 twyford-hambc2 /etc/init.d/mysql[27799]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed
Oct 26 12:55:42 twyford-hambc2 /etc/init.d/mysql[27799]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Oct 26 12:55:42 twyford-hambc2 /etc/init.d/mysql[27799]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Oct 26 12:55:42 twyford-hambc2 /etc/init.d/mysql[27799]:
Oct 26 12:56:46 twyford-hambc2 lrmd: [17345]: WARN: mysql:start process (PID 2732 timed out (try 1). Killing with signal SIGTERM (15).
Oct 26 12:56:46 twyford-hambc2 lrmd: [17345]: WARN: operation start[139] on ocf::mysql::mysql for client 17348, its parameters: socket=[/var/run/mysqld/mysqld.sock] bi$
Any help appreciated.