How to change MYSQL database directory to another directory
I Installed mysql on my CentOS 6.2 Server. But when I tried to change the location of /var/lib/mysql to another directory. I can't start the mysql. Below is what I've done
change datadir=/var/lib/mysql to
yum install mysql mysql-server mysql-devel
cp -R /var/lib/mysql /path/to/new
chown -R mysql.mysql /path/to/new
Did I miss something? Can anyone please help me on this, I'm a newbie in this field.
service mysqld start
MySQL Daemon failed to start.
Starting mysqld: [FAILED]