THE WORLD DISCUSSES #PYTHIAN ON TWITTER. HAVE A QUESTION? USE OUR HASHTAG AND ASK AWAY.

MySQL: my.ini Gotcha on Windows

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 22
OS error code  22:  Invalid argument

C:\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. Read the rest of this entry . . .

Start NowWith Pythian - database design, management and emergency handling capabilities...

Live Updates

pythian: RT @FN_Press2: Schooner Information Technology Teams with Pythian to Deliver Advanced Support and High... http://finanznachrichten.de/20
more



Testimonials

  • Serge Racine

    DBA, Brookfield Energy

    We are very satisfied by the service given to us by Andre and Shakir in support of our recent data quality and reorganization initiative.... more