Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

From Windows to Linux

Status
Not open for further replies.

vulcand4

Programmer
Jul 29, 2003
76
US
I've got a production MySQL database running on a Linux server, but do my development on a Windows laptop.

I recently overhauled an existing app and needed to write data conversion routines in order for my existing data to map to some new data layouts.

I'm running the conversion on my laptop, so I don't mess up the existing production data. I will be running some tests in parallel before going live with the new app.

When I run the conversion, Windows sets all the table names to all lower case. So when I load the data to my Linux box, the table names are all wrong.

Is there anyway to force MySQL to maintain it's case on a Windows machine so that I don't have discrepancies from one OS to another?
 
I found the answer to my question:

There is a variable called "lower_case_table_names"

Windows defaults it to "1" and Unix defaults it to "0".

This raises another question for me though.

My install of MySQL set up mysqld-nt to run as a service on windows. How do I set the above mentioned variable so that it is always set to "0"?

I created a my.cnf file and placed it in the c:\ directory, but it doesn't seem to take.

I've tried both of the following:

Code:
[mysqld]
set-variable = lower_case_table_names=0

and

Code:
[myqld-nt]
set-variable = lower_case_table_names=0

and neither of those seems to do the job. When I do a "show variables", I still see the variable set to "1"

Any suggestions?
 
Found my answer again. Although I don't know if it really answers the question, it did present a solution. In my MySQL install directory is a "my.ini" file. I modified it to set the "lower_case_table_names" variable and then restarted the windows service.

If you're wondering how to restart the service, go to control panel/services or control panel/adminisrative tools/services and use the supplied options.

I think I'll give myself a star for finding my own solution.

Later
 
OOPs, guess the forum is smart enough to not allow you to give yourself a star. Good thinking I guess. Wouldn't want everyone self inflating their contributions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top