Move MYSQL database to an another partition (EBS) by David Raleche

[root]# mv /var/run/mysqld/ /vol/etc
[root]# mv /var/lib/mysql /vol/lib/
[root]# mv /var/log/mysqld.log /vol/log/

[root]# mkdir /var/run/mysqld/
[root]# mkdir /var/lib/mysql


[root]# echo "/vol/etc/ /var/run/mysqld none bind" | tee -a /etc/fstab
/vol/etc/ /var/run/mysqld none bind
[root]# mount /var/run/mysqld/

[root]# echo "/vol/lib/ /var/lib/mysql none bind" | tee -a /etc/fstab
/vol/lib/ /var/lib/mysql none bind
[root]# mount /var/lib/mysql

[root@ lib]# echo "/vol/log/ /var/log/mysql none bind" | tee -a /etc/fstab
/vol/log/ /var/log/mysql none bind
[root@ lib]# mount /var/log/mysql


DO NOT FORGET RIGHTS
CHOWN mysql:mysql


Latest Post

Popular Post

Our Skills

Author

Project Director Information Architect Database Administrator Unix Administrator Senior Developer Project Manager Product Manager Web Marketer Cloud Engineer

Contact Us

For any questions or project ideas please contact me at the following.

I'm here