Some time ago, I was building a new MySQL DB server (5.7.25) and like all DBAs, I have a template of my.cnf that I use for the new instances after changing a few variables based on the instance resources, replication … etc. I had MySQL installed but I struggled on having the service started!
MySQL failed to start, no errors were printed at all in the MySQL error log – or the log was not created from the first place 🙂 – even no errors in the system log and I had no clue what was going on!
After some digging in, I found the bad guy! The variable secure_file_priv referred to a directory that didn’t exist. When I had the directory created, everything was fine and the service started.
I tried to repeat the same scenario in MySQL 8 and it was much better. The error log indicated the root cause of the issue as below:
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
I’ve created a bug report (Bug #96406) and will update this post when it got fixed.
When you use my.cnf templates, make sure that all paths refer to directories that do exist on the system!
An impressive share! I’ve just forwarded this onto a co-worker who had been doing a little research on this.
And he in fact ordered me breakfast due to the fact that I discovered it for him…
lol. So allow me to reword this…. Thanks for the meal!!
But yeah, thanx for spending some time to discuss
this topic here on your internet site.
LikeLiked by 1 person
I’m glad the post helped you to get the problem fixed!
And I hope you enjoyed the breakfast 😀