Installed Ubuntu 10.04 from ISO onto a blank virtual box machine.
All worked well for a while, until I recently did an aptitude safe-upgrade.
The next time I booted the system, mysql failed to start and refused to do so when I issued: sudo service mysql start
It would just hang there.
Tracked the issue down to this bug. How I maged to get get it to work:
In a terminal: sudo /usr/sbin/mysqld
In another terminial:
sudo service mysql start
sudo service mysql stop
sudo killall mysqld
Now mysql will start and stop on the system as it should.
[nb: this is a rough artical, I will flesh it out when I have more time]
[edit 27-05-2010: this is not a permanent fix and requires to be executed after every system start. Looking forward to a fix on this…]
[edit 22-06-2010: see Ryan’s comment to fix this issue. I hope this helps others :)]
God bless you. I would’ve waisted another 2 hours…
Run this:
sed -i -e ‘s/^exec /usr/sbin/mysqld/exec sudo -u mysql /usr/sbin/mysqld/’ /etc/init/mysql.conf
and reboot. Mysql will be 100% manageable via upstart scripts.
The issue was that the init scripts tried to run mysqld as user root, instead of user mysql. That sed one-liner there fixes the issue permanently.
You could use nano or vi on /etc/init/mysql.con as well. Just change line 26 to read:
exec sudo -u mysql /usr/sbin/mysqld
instead of
exec /usr/sbin/mysqld
Thanks Ryan.
Thank you both, the author of the post and Ryan for sharing his solution I confirm it worked for me too.
Legend. Thank You!
This worked for us after a day of staring at this and reading all the bug reports in Ubuntu forums trying to figure it out – thanks!
Woohoo – thanks @ OP and Ryan!