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.

After a restart, mysql won't start. sudo service mysql start gives start: Job failed to start and the logs are empty, so I have no idea where to start. I'm pretty sure permissions problems are taken care of.

Edit:
All disks have at least 1G of space and sh -x /etc/init.d/mysql start gives me:

+ set -e
+ basename /etc/init.d/mysql
+ INITSCRIPT=mysql
+ JOB=mysql
+ [ mysql = upstart-job ]
+ [ -z start ]
+ COMMAND=start
+ shift
+ [ -z  ]
+ ECHO=echo
+ echo Rather than invoking init scripts through /etc/init.d, use the service(8)
Rather than invoking init scripts through /etc/init.d, use the service(8)
+ echo utility, e.g. service mysql start
utility, e.g. service mysql start
+ echo

+ echo Since the script you are attempting to invoke has been converted to an
Since the script you are attempting to invoke has been converted to an
+ echo Upstart job, you may also use the start(8) utility, e.g. start mysql
Upstart job, you may also use the start(8) utility, e.g. start mysql
+ grep -q  start/
+ status mysql
+ [ -z  ]
+ [ start = stop ]
+ [ -n  ]
+ start mysql
start: Rejected send message, 1 matched rules; type="method_call", sender=":1.105" (uid=1000 pid=3208 comm="start mysql ") interface="com.ubuntu.Upstart0_6.Job" member="Start" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init")

share|improve this question
    
/etc/init.d/mysqld start nothing in /var/log/messages or /var/log/mysqld ? –  Bart De Vos Jan 29 '12 at 21:33
1  
Do you have any full disks? If the log disk is full, it can't write a log. –  Mike Scott Jan 29 '12 at 21:44
    
Having exactly the same problem. Did you find a solution for it? None of the answers here fixed the problem. :/ –  Torsten Jun 11 '12 at 3:26
    
I believe I had to reinstall (purge with a manual backup of /var/lib/mysql) –  Owen Jun 16 '12 at 23:25
add comment

3 Answers

This message comes from the service script, not from mysql. So you have to look at the script and figure where/why it fails.

Do that by calling sh -x /etc/init.d/mysqld start.

note: on some questions, like this one, I don't see any "add comment". I only have the option to add an answer. How can I just add a comment ?

share|improve this answer
    
Gregory, I believe you don't have the ability yet. You get more access as you build reputation. It's probably to prevent automated spam comments on spam posts by newly created users. –  Kyle Smith Jan 29 '12 at 21:52
1  
Well this is an answer and not a comment. To outline it a bit further I will edit Gergorys answer a bit. –  Nils Jan 29 '12 at 22:15
add comment

Same issue here, for me the reason was, that the my.cnf file has been moved from /etc/my.cnf to /etc/mysql/my.cnf, but there still was a "dead" symlink pointing to /etc/my.cnf.

Check if /etc/mysql/my.cnf is a symlink:

user@machine:~ $ ls -l /etc/mysql/my.cnf
lrwxrwxrwx 1 root root 9 Jan 11  2011 /etc/mysql/my.cnf -> ../my.cnf

If it is a symlink, check if the target file exists. If not, remove the symlink and create /etc/mysql/my.cnf from /etc/mysql/my.cnf.dpkg-new or something like that... if you have it.

sudo unlink /etc/mysql/my.cnf
sudo mv /etc/mysql/my.cnf.dpkg-new /etc/mysql/my.cnf

P.S: If the symlinks target is existing, you might want to check dmesg | grep cnf for apparmor error messages.

share|improve this answer
add comment

This problem can occur if the pid file still exists, such as after a crash. Check for that and delete it if it does exist (check the config file to determine its location).

share|improve this answer
add comment

Your Answer

 
discard

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.