Skip navigation links
Articles
MySQL: my.ini Gotcha on Windows
Add to My Link Library +1 Vote Up -0Vote Down
The other day we began to encounter weird and random errors on small and innocent queries that shouldn't give any errors at all. It all lead to one of our most basic health checks failing for no apparent reason. The first clue that popped into our minds was related to case-sensitivity, since the failing check was looking for the column names of the only table in the schema with UPPER CASE name. This symptom was especially weird since all of this was happening on MySQL setups running on Windows, and so we're not sure if this was being caused by some internal code library, MySQL, or Windows itself.Since that was the only clue we then had, it seemed obvious that we should start fiddling with the lower_case_table_names system variable. After a couple of restarts, this approach was leading us nowhere, so we finally gave up on it. Then, we had the brilliant idea of actually executing that statement by hand on the command line to see what happened:C:\\pythian>mysql -uXXXX -p XXXX -e "desc TABLE_NAME"Enter password: *****ERROR 1 (HY000) at line 1: Can't create/write to file 'C:\\MySQL mp\\#sql_634_0.MYI' (Errcode: 22)C:\\pythian>perror 22OS error code 22: Invalid argumentC:\\pythian>None of us remembered seeing this one before, so we stared at the monitor for a few moments, not realizing the meaning of this message. I guess our focus on the case-sensitivity was driving us away a from the real cause. So . . .  time to check the "my.ini" file.


Report this link: