1. Create new database directory
sudo mkdir /home/db/
2. change new database directory owner to mysql
sudo chown -R mysql:mysql /home/db/*
3. stop the mysql server
sudo /etc/init.d/mysql stop
4. edit /etc/mysql/my.cnf configuration file
sudo vim /etc/mysql/my.cnf
5. copy the files from /var/lib/mysql/ except ib_arch_log_0000000000, ib_logfile0 etc.
6. All files and directories should be owned by mysql:mysql
7. Restart MySQL service
sudo /etc/init.d/mysql start
ref: DebianAdmin
Printed copies available, email rbahaguejr [at] gmail [dot] com |
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment