05 April 2007

mysql Couldn't find the mysql server or manager

Solution
Step 1.)

Rem out the line in /etc/my.conf that was setting basedir to /var/lib. As seen below:

user=mysql
#basedir=/var/lib

Step 2.)

Create the directory "/var/run/mysqld" if it does not exist. Then chown that directory to mysql.mysql as below...

mkdir /var/run/mysqld
chown mysql.mysql /var/run/mysqld

Step 3.)

Start the service..

service mysql start

27 comments:

najamtariq said...

Thanx dear .....

Anonymous said...

thank you very much, this is very helpful for me, you are vey kind!

Anonymous said...

this worked fine and fixed my problem, the only issue I found was that on my system it wasn't called my.conf it was called my.cnf. Centos5 (red hat 5 enterprise)

Anonymous said...

thanks man... simple but powerful.

Anonymous said...

Thank you so much for this. It saved me lots of time. You RIP!

Vijay said...

Thankyou very much.
Before reading this we wasted 2 days in investigating the issue.

It was simple and great solution.

Justine said...

Thank you so much!

Anonymous said...

If I remove the basedir then it works for me too. But what if I want to change the database location....wouldn't I need the basedir in my.cnf

Anonymous said...

Very special thanks!!! It works now.

Roy said...

Thank you !!!!

Anonymous said...

God bless you. Worked like a charm.

Anonymous said...

May Peace and happiness reward you for the help provided here.

Phoenix said...

Superb solutions :P luckyly i ask Mr. Google and found this solutions here

Anonymous said...

Thanks... Saved my upgrades! :)

IkkI said...

I also had to create user mysql
And chown from 27:27 to mysql:mysql on /var/lib/mysql.

I think by default my RedHat ES 5 does not have user mysql and the rpm's downloaded from mysql.com for that OS depended on that user existing prior to upgrade.

Anonymous said...

Now, i have this... Could anybody help me?
Starting MySQL/etc/init.d/mysql: line 159: kill: (6459) - No such process

Anonymous said...

great post!

Anonymous said...

Thanks

Its great the issue is being fixed

matt said...

brilliant

joselee said...

Many thanx for this solution, after 3 hours working with the server, I googled to this superb solution

Anonymous said...

Thanks a lot!
:)

Anonymous said...

works fine! :)

Anonymous said...

Thank You ;)

fongthai said...

Does NOT work with me.
I got this error message when start mysql: "Starting MySQL.... ERROR! Manager of pid-file quit without updating file."

Anonymous said...

Thanks!!!!!!!

Anonymous said...

it's people like you who make my day...thanks.

Anonymous said...

hi dud.. I try but its not working. still same.I did the following jobs..Create file on /etc named my.cnf and its had the values


[mysqld]
basedir=/var/lib/mysql
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

[mysql.server]
user=mysql
#basedir=/var/lib

[client]
socket=/var/lib/mysql/mysql.sock

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

-------
Then follow your instruction but not working.
I install
MySQL-client-standard-5.0.27-0.rhel4.i386.rpm
MySQL-devel-standard-5.0.27-0.rhel4.i386.rpm
MySQL-server-standard-5.0.27-0.rhel4.i386.rpm