Moved /var/lib/mysql and now cPanel cant use MySQL

Cheater

Registered
Feb 13, 2005
2
0
151
One of my sites has a absolutely massive database so I had to move it to /home.

Now cPanel cant add/delete databases. :confused:
phpMyAdmin works fine and so do all my php scripts.
I have even deleted a user and then recreated it and it's databases still exist.

I just did a simple mv and symlinked the dir to the new path.

Any ideas?
 

bmcgrail

Well-Known Member
Dec 8, 2003
83
0
156
Not sure.
It might have something to do with the permissions on /home. /home is not world or group readable.

Try moving it to /usr

My databases are in /var/db
I moved them to /usr/var/db
Did a sym link and everything works great.

lrwxr-xr-x 1 root wheel 11 Feb 22 14:20 db -> /usr/var/db
 

gfmorris

Member
Jun 6, 2003
20
0
151
Huntsville, AL, USA
Thanks for the advice on this; my /var/lib/mysql was really choking the var partition, and I'm going to give this a whirl.

Am I to assume that the safest way to do this is to shutdown mysqld, move /var/lib/mysql into /home, edit my.cnf, set a symbolic link, and then start mysqld again?

Thanks in advance for any future advice.

GFM
 

Game Wizards

Active Member
Apr 6, 2003
35
0
156
gfmorris said:
Thanks for the advice on this; my /var/lib/mysql was really choking the var partition, and I'm going to give this a whirl.

Am I to assume that the safest way to do this is to shutdown mysqld, move /var/lib/mysql into /home, edit my.cnf, set a symbolic link, and then start mysqld again?

Thanks in advance for any future advice.

GFM
Yea, shut it down, cp -Rf --preserve=all /var/lib/mysql/* /whatever/whereever/, possibly move /var/lib/mysql to /var/lib/mysql-bak for the time being, then symlink the dirs. Works fine here.