Mysql move - won't work
Posted on 2014-03-08
I added a second hard drive to my VM. The OS is Centos 5.x My msyql database WAS located at /var/lib/mysql and I created a directory called /data/ that points to the new drive. I moved all the files...created the mysql:mysql ownership...changed the my.cnf to show the new path:
socket = /data/mysql/mysql.sock
port = 3306
datadir = /data/mysql
BTW...the mysqld DOES start. I can log on using the command line. Just not the webserver.
Restarted server...tested connection to mysql...but I still get this from my web pages...
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in xxxxxxxxxxxxxxxxxx
I cannot connect to the database because: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
There has to be something still pointing to the /var/lib/mysql folder. Anyone able to help?