Centos 6, mysql 5.1.52-1.el6_0.1
I wanted to change my datadir from /var/lib/mysql to /home/mysql
as well as to put socket file to /var/run/mysqld
Here my configs and error
where should i change path else to get it working ?
# mysql -u root -p
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
# netstat -tulpn | grep mysql*
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 1576/mysqld
edited daemon script as well /etc/rc.d/init.d/mysqld
# Disabling symbolic-links is recommended to prevent assorted security risks
get_mysql_option mysqld datadir "/home/mysql"
get_mysql_option mysqld socket "/var/run/mysqld/mysql.sock"
New socket file is being created in proper dir i want to.
Yes i have restarted service as well as whole machine.
Why does it still trying to read sock file in old location ? Where should i change this setting ?