MySQL 报错Failed to access directory for --secure-file-priv

mysql-files文件问题

#MySQL启动失败,日志中报错如下:
[ERROR] Failed to access directory for --secure-file-priv. Please make sure that directory exists and is accessible by MySQL Server. Supplied value : /var/lib/mysql-files

#造成这种情况可能是因为mysql-files文件夹不存在或权限错误
#解决办法如下:
shell> touch /var/lib/mysql-files
shell> chown mysql:mysql /var/lib/mysql-files
shell> service mysqld restart
Stopping mysqld:                                           [  OK  ]
Starting mysqld:                                           [  OK  ]
    原文作者:极地瑞雪
    原文地址: https://www.jianshu.com/p/22737ad28611
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞