Starting MySQLCouldn't find MySQL manager or server

casey

Well-Known Member
Jan 17, 2003
2,303
0
191
When upgrading to mysql5 many people who have customized their my.cnf files may find that mysql won't start. In this case, make sure that you comment out or remove the basedir config:

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

Hope that saves somebody some time. ;)
 

richy

Well-Known Member
Jun 30, 2003
276
1
168
Whhooo! We were getting the:
StartingMySQL Couldn't find MySQL manager or server [FAILED]
message after upgrading to MySQL 5 and this post fixed it! Many thanks!
 

avik

Member
May 31, 2003
5
0
151
yes. it's working now.

my /etc/my.cnf :

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

[mysql.server]
user=mysql
basedir=/var/lib
old-passwords = 1

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


i have removed parameter (basedir=/var/lib) and mysql is working now.
 

mambomouth

Member
Jul 16, 2005
8
0
151
Thank you for the tips guys it the basedir for me as well.
rhel 5 mysql 5.0.27 upgraded.

Cheers,
Brian
 

kazey

Member
Mar 30, 2006
5
0
151
Upgrading to MYSQL 5 on Cpanel/WHM Server

This is what worked for me.

Step 1.)
Go into your WHM > TweakSettings and select the MySQL 5 > Save it

Step 2.)
login as root via SSH and run /scripts/mysqlup, it will do the upgrade for you.

Step 3.)

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

user=mysql
#basedir=/var/lib

Step 4.)

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 5.)
Kindly check if a socket file exists on /tmp.
if not add one
[email protected] [~]# cd /tmp
[email protected] [/tmp]# ln -s /var/lib/mysql/mysql.sock .

Step 6.)
Start the service..

service mysql start
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,608
77
308
cPanel Access Level
Root Administrator
OK, now.

#basedir=/var/lib works, but why?

what's the point anyway?
That's for customized installs as the basedir directive instructs MySQL to look in that location for all the MySQL tools (binaries).
 

sassy

Registered
Sep 12, 2005
3
0
151
When i try to run this command i get permission denied

mkdir /var/run/mysqld: permission denied

can someone help me i am lost at the moment.


thanking in advance



:confused:
 
Last edited:

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,608
77
308
cPanel Access Level
Root Administrator
When i try to run this command i get permission denied

mkdir /var/run/mysqld: permission denied

can someone help me i am lost at the moment.


thanking in advance



:confused:
Are you executing the command as root?

Does /var/run exist?
 

sassy

Registered
Sep 12, 2005
3
0
151
I upgraded and when i try to restart mysql i get this error.


/usr/local/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)' Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists! mysql has failed, please contact the sysadmin (result was "Warning, no valid mysql.sock file found.mysql has failed").

I cant work out what has gone wrong so i tried to do what is mention in this thread


@cpanelkenneth

I run it as admin being a FREEBSD server


/var/run : permission denied


If someone can help me iam willing to pay to get this fixed.



:confused: