Bug #96501 MySQL server doesn't start and no error in the log
Submitted: 10 Aug 17:14 Modified: 11 Aug 12:23
Reporter: Marco Tusa Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Options Severity:S2 (Serious)
Version:8.0.17, 8.0.11 OS:Any
Assigned to: CPU Architecture:Any
Tags: GLOBAL VARABLES, json, mysql8, persist

[10 Aug 17:14] Marco Tusa
Description:
If mysqld find that the mysqld-auto.cnf in the data directory has invalid json, whatever is the reason why, it doesn't start and there is NO message in the error log. 
IE :
mysqld-auto.cnf: { "Version" : 1 , "mysql_server" : { "wait_timeout": { "Value : "150" , "Metadata" : { "Timestamp" : 1565455891278414, "User" : "root" , "Host" : "localhost" } } } }
Check the missing quote after the VALUE label

console:
tusa@tusa-dev:/opt/mysql_templates/mysql-8.0.17futex$ ps aux|grep 8113
tusa      8119  0.0  0.0  14224   896 pts/1    S+   12:54   0:00 grep --color=auto 8113
[1]+  Exit 1                  bin/mysqld --defaults-file=./my.cnf

LOG:
no message 

I agree that this file SHOULD NOT NE TOUCH by hand, but at the same time I think the server should raise the error.

How to repeat:
1) start mysqld (8.17)
2) SET PERSIST wait_timeout = X
3) Stop mysqld
4) manually do something stupid on the mysqld-auto.cnf
5) restart mysqld

Suggested fix:
This is a problem in the Json parser, and human stupidity, I just think we should have the server indicating the problem in the error log
[11 Aug 12:23] Umesh Shastry
Hello Marco Tusa,

Thank you for the report and feedback.
Agree with your conclusion that it should have logged/reported an error. This was expected behavior as documented i.e quoting from manual "Manual changes to the file may result in a parse error at server startup. In this case, the server reports an error and exits". - https://dev.mysql.com/doc/refman/8.0/en/persisted-system-variables.html

regards,
Umesh
[11 Aug 12:25] Umesh Shastry
Test results - 8.0.17

Attachment: 96501_8.0.17.results (application/octet-stream, text), 15.65 KiB.

[11 Aug 12:28] Umesh Shastry
- Lowest version checked 8.0.11, similar behavior