我需要将我的数据目录移动到同一台服务器上的一个更大的驱动器。
# stop mysql
/etc/init.d/mysql stop
# copy the data over
cp -R -p /var/lib/mysql /home/mysql
#edit my.cnf
# and add a 'datadir' section with the new path.
#restart mysql
/etc/init.d/mysql restart复制数据需要很长时间(我怀疑),但至少是安全的。
我可能还想在某个地方添加一个临时目录。
我还需要做些什么来移动数据吗。
我需要重建索引还是其他什么吗?
https://dba.stackexchange.com/questions/137910
复制相似问题