Sign in using Google or Yahoo! id.  

MySQL migrating Windows DB to Linux

 Comments Share:   Twitter   Reddit   HackerNews   Facebook 

When migrating MySQL data from Windows to Linux we generally face the issue of case-sensitivity in table names. In Windows, MySQL is case-insensitive. So a developer might have created a table in uppercase, and queried in the application in lowercase. This will not work in Linux.

lower_case_table_names

So when you have to get going without investing too much time in correcting the application, one thing that can be done is change the lower_case_table_names parameter in the Linux MySQL instance.

In your my.conf file (in my Ubuntu system, it is available here: /etc/mysql/my.cnf), add the parameter:

lower_case_table_names = 1

underneath the [mysqld] section. What this means:

Table names are stored in lowercase on disk and name comparisons are not case sensitive. MySQL converts all table names to lowercase on storage and lookup. This behavior also applies to database names and table aliases.

From official MySQL documentation.

Restart MySQL after this configuration change, and then dump the Windows MySQL data.

Restarting MySQL in Ubuntu

$ sudo service mysql restart
Posted on July 28, 2010 05:33 AM by Subhash Chandran
interoperability mysql
blog comments powered by Disqus