MySql crossplatform tip (especially with an ORM)

by Koen 20. December 2009 23:34

This is just a small post for my own reference and who knows it might even save someone some work.

I am developing on windows and use Subsonic as an ORM in a current project. At the client site we have a linux server running MySql. We however develop against a MySql on windows. One particular pain point we encountered was that by default on windows all identifiers, including table and column names are transformed in lower case. We got a lot of table not found exceptions when we tried  (and failed) to deploy our newly generated ORM classes at the customer site.

The solution is very simple and the behavior well documented on the MySql site.

In your mysql installation folder (by default: C:\Program Files\MySQL\MySQL Server 5.5) add the following line in the my.ini under the [mysqld] section (which configures the mysql service):

lower_case_table_names=0

After restarting the service your MySql database will have the same identifier casing behavior as a Linux installation.

Tags:

MySql

Comments

6/9/2010 4:35:31 PM #

Shannon McMillan

A very detailed self-reference. thanks for sharing!I've recently found working with mySql slightly difficult.

Shannon McMillan United States | Reply

6/20/2010 1:53:10 PM #

Clarence Oswald

I had a site like this once, but it attracted so many spam comments I had to close it. You seem to be doing a better job keeping out the spammers! Well done!

Clarence Oswald United States | Reply

7/30/2010 10:30:36 AM #

Tyson F. Gautreaux

you just got me a great idea to blog about...

Tyson F. Gautreaux United States | Reply

8/8/2010 6:00:39 PM #

Tanisha Goya

nice post, have a great week end!

Tanisha Goya United States | Reply

8/14/2010 11:21:43 AM #

Scottie Oballe

a lot of comments on this post...

Scottie Oballe United States | Reply

10/8/2010 8:15:27 AM #

312-50

We got a lot of table not found exceptions when we tried  to deploy our newly generated ORM classes at the customer site.

312-50 United States | Reply

4/8/2011 1:48:29 AM #

Copywriter

Well done on this site with all of your detailed information.

Copywriter United States | Reply

8/19/2011 2:25:16 PM #

Jillian Michaels Diet Plan

Yes, It's exactly what I was thinking as well, just I wasn't sure so I wanted to double check, but its really good.

Jillian Michaels Diet Plan Bulgaria | Reply

9/7/2011 2:16:53 PM #

Supreme 90 Day

I capital to acknowledge you for this accomplished read!! I absolutely enjoyed every little bit of it. I accept you bookmarked your website to analysis out the new being you post.

Supreme 90 Day Bulgaria | Reply

9/13/2011 1:54:54 PM #

Garden Groom

I am really enjoying reading your well written articles. It looks like you spend a lot of effort and time on your blog. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!

Garden Groom Bosnia and Herzegovina | Reply

10/12/2011 1:13:25 PM #

Turbo Oven

Truly, absurd posting! Kudos for sharing. I do accept a brace questions for you, so I'll attending for your email and email them anon if that's okay.

Turbo Oven Brazil | Reply

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading