`

CentOS迁移MySQL data目录注意事项

阅读更多
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老是启动不了。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics