Server & MySQL problems - please help!

Hi all,

My Server Admin has moved the MysQL databases from the default place in /var/

to

/usr/lib/mysql

in order to free up space in /var/

However, an error has occured like this:

Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/username/public_html/new/includes/functions/database.php on line 19
Unable to connect to database server!

I've done locate mysql.sock in SSH as r00t, and it tells me it is in var/lib/mysql

But if I CD into var/lib/mysql and do ls -l it doesn't show ??

Can anyone advise on what to do to get MySQL up and running properly please. The MySQL daemon is up and running according to the servsup script in Cpanel.

Also:

btw, have tried a graceful reboot - didn't work. Also a hard reboot, again didn't work.

Have tried shutting down MySQL and restarting via WHM, and that also didn't work :


mysql has failed, please contact the sysadmin. Jun 30 22:45:55 server mysql: No mysqld pid file found.

Looked for /var/lib/mysql/server.mydomain.com.pid. Jun 30 22:45:55 server rc: Stopping mysql: succeeded

I don't think that this is a Cpanel error, which is why I am posting for help here.

Also I am getting the following:

The MySQL daemon is looking for the PID file at:
/var/lib/mysql/server.mydomain.com.pid

But, if I do a locate *.pid as r00t, it shows the PID file located in:

/usr/lib/varlib/mysql/server.mydomain.com.pid



##############################

My thought is that the Server Admin has neglected to properly a create a link between where the MySQL stuff was and where it now is - does that make sense.

The next question is how can I put it right ? Also does anyone know of a reliable and trustworthy Sysadmin to do jobs like this, upgrading kernel etc.

Many thanks!

 

 

 

 

Top