https://www.tecmint.com/change-default-mysql-mariadb-data-directory-in-linux/
需要注意要进行这一步:
Step 4: Set SELinux Security Context to Data Directory
This step is only applicable to RHEL/CentOS and its derivatives.
Add the SELinux security context to /mnt/mysql-data before restarting MariaDB.
# semanage fcontext -a -t mysqld_db_t "/mnt/mysql-data(/.*)?"
# restorecon -R /mnt/mysql-data
不然MySQL老是启动不了。
CentOS迁移MySQL data目录注意事项
猜你喜欢
转载自clia.iteye.com/blog/2399817
今日推荐
周排行