Bug #96406 No errors in the log when secure_file_priv refers to a non exist directly
Submitted: 2 Aug 2019 0:14 Modified: 2 Aug 2019 7:14
Reporter: Abdel-Mawla Gharieb Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Logging Severity:S3 (Non-critical)
Version:5.7.25, 5.7.27 OS:CentOS (CentOS Linux release 7.6.1810)
Assigned to: CPU Architecture:Any

[2 Aug 2019 0:14] Abdel-Mawla Gharieb
Description:
When starting mysql and secure_file_priv refers to a directory that does not exist, MySQL fails to start and no errors at all are recorded in the log which makes it hard to troubleshoot the issue and find the root cause!

It seems that the issue has already been resolved in MySQL 8.0.15 as we get the following error message when secure_file_priv refers to a directory that does not exist:

2019-03-25T23:39:59.810992Z 0 [ERROR] [MY-010095] [Server] Failed to access directory for --secure-file-priv. Please make sure that directory exists and is accessible by MySQL Server. Supplied value : /tmp/mysql
2019-03-25T23:39:59.811178Z 0 [ERROR] [MY-010119] [Server] Aborting

How to repeat:
1- Install MySQL 5.7.25 or older versions.
2- In my.cnf file, set secure_file_priv to a folder that does not exist.
3- Start MySQL

Suggested fix:
As in MySQL8, print an error message in the log referring to the root cause.
[2 Aug 2019 7:14] MySQL Verification Team
Hello Abdel-Mawla Gharieb.

Thank you for the report and feedback.

regards,
Umesh