I changed the data directory of mysql through my.cnf file.
my.cnf has the details.
"#" indicates the i have changed accordingly to the main directory.
I want to move my tables from /var/lib/mysql to /home/db.
I changed the permission to:-
sudo chown -R mysql:mysql /home/db/*
Expand|Select|Wrap|Line Numbers
- [mysqld]
- datadir=/var/lib/mysql
- #datadir=/home/db
- socket=/var/lib/mysql/mysql.sock
- #socket=/home/db/mysql/mysql.sock
- set-variable=max_allowed_packet=16M
- [mysql.server]
- user=mysql
- basedir=/var/lib
- #basedir=/home/db
- [safe_mysqld]
- err-log=/var/log/mysqld.log
- pid-file=/var/run/mysqld/mysqld.pid
- #err-log=/home/log/mysqld.log
- #pid-file=/home/run/mysqld/mysqld.pid
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
I don't what to do?
pls help!!
with regards
Archana