How to change database directory to another directory

view full story

http://www.unix.com – Hi, 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 Code: yum install mysql mysql-server mysql-devel mkdir /path/to/new/ cp -R /var/lib/mysql /path/to/new chown -R mysql.mysql /path/to/new vi /etc/my.cnf change datadir=/var/lib/mysql to datadir=/path/to/new Code: service mysqld start MySQL Daemon failed to start. Starting mysqld:                                  &nb (HowTos)