I have a server on which MYSQL cannot be copied. In this instance, there is a root device with EBS support (/ dev / sda1) that constantly stores files. It is not clear to me whether MYSQL data and binary log files are constantly stored.
Should he do this if it is installed in the root? I would think so.
Should I instead mount and mount another volume and then point the MYSQL server to a new location?
My commands are as follows (plus locking the MYSQL table when creating a snapshot)
sudo mkdir /vol/etc /vol/lib /vol/log sudo mv /etc/mysql /vol/etc/ sudo mv /var/lib/mysql /vol/lib/ sudo mv /var/log/mysql /vol/log/ sudo mkdir /etc/mysql sudo mkdir /var/lib/mysql sudo mkdir /var/log/mysql echo "/vol/etc/mysql /etc/mysql none bind" | sudo tee -a /etc/fstab sudo mount /etc/mysql echo "/vol/lib/mysql /var/lib/mysql none bind" | sudo tee -a /etc/fstab sudo mount /var/lib/mysql echo "/vol/log/mysql /var/log/mysql none bind" | sudo tee -a /etc/fstab sudo mount /var/log/mysql
I am not a sys admin expert, and I don't want to corrupt an existing database. Is there any risk here? Should I even worry about an additional device here or just stick with the built-in root device?
source share