MySQL SubSonic case sensitivity non-sense

So I had my database on a Linux box using MySQL then I decided to move it to my local box while in development as I wanted to simplify my life.

I backed up the files from the Linux machine and then restored them to the Windows box MySQL instance. Then I told Subsonic to re-run the T4 files to regenerate the classes for the DAL (of course after I modified my connection string).

Then I look to my horror and I have 240 errors. Nice. Seems the case sensitivity is not as one would expect between the Linux and the Windows box. 

After farting around with a couple of SQL rename statement, which didn’t work, I read that in window the best way is to stop the MySQL service, go to the files in the DB data folder rename them as you want them to be, then re-start the MySQL service.

I did this, then regenerated my classes (again via the Subsonic T4 files) and this time no errors, the case sensitivity of the filenames (yes I like CamelCase, so what) carries over into the MySQL connections.

The trick (to me anyhow) was figuring out where the heck the files for the DB where stored. I found it like this; If you look on the properties of the MySQL service you will see it is getting handed the ini file to use for settings (I think the default is ‘my.ini’). This file in in the program files install folder, so open it up and you will see a “datadir” section. This is the folder where the database files are stored.

Enjoy!

 

0