Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

After recent update something went wrong with Ubuntu services. MySQL process can no longer be accessed via service mysql [action], so when ever I'm trying to execute command I'm receiving following message:

user@hostname:~# service mysql restart
restart: Unknown instance:

However I can still access service via /etc/init.d/mysql, this command works as expected:

user@hostname:~# /etc/init.d/mysql restart
 * Stopping MySQL (Percona Server) mysqld                               [ OK ]
 * Starting MySQL (Percona Server) database server mysqld               [ OK ]
 * Checking for corrupt, not cleanly closed and upgrade needing tables.

Can some one suggest me what can be done to fix this issue?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

I know we solved this but, there are many reason to why this could be caused. In your case it was that the Percona Server wanted to upgrade Mysql 5.1, which left some confusion between some configuration files that percona was using but not the Ubuntu mysql server 5.1. So removing/purging the package mysql-server-5.1 was the solution.

The normal reaction for this would be to blame it on upstart, but after checking a lot we found the problem.

This is not the case for many mysql problems that are caused after an upgrade, either for that package or for the whole system.

It worked for Mr Nazariy, but I write this just to warn users that come here to first check other solutions. For example:

  • Check your dmesg output. It usally says a lot about problems like this or at least it guides the person to where to look.

  • Do a cat on log or error file in /var/log. In this case, cat /var/log/mysql/error.log told us something about another problem. We solved that one first and then proceeded to the one mention in the question.

  • Linux is very user friendly when trying to solve problems. Most of the time it will tell you the problem and solution.

  • When doing an upgrade, check to see if there is another instance of that service/app/anything running that might/could conflict (You might get a warning throughout the upgrade process).

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.