Mar142010

Why does MySQL not start on boot of Ubuntu?

cpopin asks:

I’m getting this annoying error when I start MySQL server:

root@blix:~# /etc/init.d/mysql start
* Starting MySQL database server mysqld [ OK ]
* Checking for corrupt, not cleanly closed and upgrade needing tables.
root@blix:~# ERROR 1045 (28000): Access denied for user ‘debian-sys-maint’@'localhost’ (using password: YES)

It’s annoying for several reasons:
1. I believe this error is the reason MySQL is not starting on boot.
2. I have to manually start it myself.
3. This is a design flaw. When I do start it manually, it shows no indication that it has started.

The above command actually starts MySQL, but returns an error code of 3, indicating that it failed. The only way to know for if it started successfully is to do a status and examine the return error value to see if it’s 0. Even that is misleading.
root@blix:~# /etc/init.d/mysql status; echo $?
/usr/bin/mysqladmin: connect to server at ‘localhost’ failed
error: ‘Access denied for user ‘debian-sys-maint’@'localhost’ (using password: YES)’
*
0

I applied the following answer I found in the Internet to no avail:

GRANT ALL PRIVILEGES ON *.* TO ‘debian-sys-maint’@'localhost’ IDENTIFIED BY ‘cvy9VhFwfvw3ghKM’;

This command added the debian-sys-maint user, but didn’t fix the problem.

Any ideas would be appreciated.

Sincerely,
-=- cpopin

P.S. I’m an old Experts Exchange expert who’s dissatisfied with their business model and thought I’d give makeusof.com a chance.


Know someone who can answer? Share the question with your friends!

Comments for this Question are closed.

If you are looking for help, please ask a new question here.

We will be happy to help you!

Hide 3 Comments

  • Anonymous March 15, 2010

    That error is when you start it manually or via your startup script? Have you checked out this thread here http://ubuntuforums.org/showthread.php?t=991026 ?

    Can you post your startup script?

  • ipod to mac April 5, 2010

    I’ve encountered this problem while transferring files from my ipod to mac. I don’t know why does MySQL not start on boot of Ubuntu.. Any ideas? Thanks for this post..

  • Wcdrotar January 2, 2011

    Try logging as root instead of sysmaint

Please wait...