Awd
Verified User
- Joined
- Aug 9, 2015
- Messages
- 316
Hi,
I need to move mysql from var/lib/mysql to home/mysql.
I found this help to do:
https://help.directadmin.com/item.php?id=12
My question, is there any difference when installed Mysql with Mariadb?
And finally, let´s assume something gone wrong, how to revert it quickly?
I need to move mysql from var/lib/mysql to home/mysql.
I found this help to do:
https://help.directadmin.com/item.php?id=12
Code:
cd /home
mkdir mysql
chown mysql:mysql mysql
cd mysql
perl -pi -e 's/mysqld=ON/mysqld=OFF/' /usr/local/directadmin/data/admin/services.status
/sbin/service mysqld stop
cp -Rp /var/lib/mysql/* .
cd /var/lib
mv mysql mysql_old
ln -s /home/mysql ./mysql
/sbin/service mysqld start
perl -pi -e 's/mysqld=OFF/mysqld=ON/' /usr/local/directadmin/data/admin/services.status
#once satisfied that mysqld is running and functioning correctly, remove the old data:
rm -rf mysql_old
My question, is there any difference when installed Mysql with Mariadb?
And finally, let´s assume something gone wrong, how to revert it quickly?