But now I want to move the database from the default location /var/lib/mysql to a different directory (/db).
Copied the database from /var/lib/mysql to /db
I have changed the path in /etc/my.cnf to:
Code: Select all
[client]
socket=/db/mysql-data/mysql.sock
Code: Select all
[mysqld]
datadir=/db/mysql-data
socket=/db/mysql-data/mysql.sock
Code: Select all
APPLICATION ERROR #400: Database connection failed. Error received from database was #2002: No such file or directory.