3

Ok, so I have dumped a MySQL 5.x database from an OS X instance, and am having problems importing the database into the OpenShift MySQL 5.5 container. My tables are Camel-case (eg "tblAccounts") but the script is throwing errors like "cannot find table tblaccounts".

I believe that MySQL's lower_case_table_names flag is set to 2 on OS X. And I was able to do a rhc set env command to change this variable from 0 to 2 on OpenShift. I keep getting the missing table error.

I have tried multiple combinations of this flag, and have tried to reload the db from scripts created using mysqldump and MySQL Workbench, and I haven't found a clean approach where this error does not appear. Am running out of ideas on how to do this cleanly. Any suggestions? Thanks,

fc

1 Answers1

0

I know this is a bit late -- but for anyone else having this problem.

MariaDB will change lower_case_table_name from 2 to 0 when it starts up, if it sees that it's on a case-sensitive file system:

[Warning] lower_case_table_names was set to 2, even though your the file system '/var/lib/mysql/' is case sensitive. Now setting lower_case_table_names to 0 to avoid future problems.

I assume mysql does the same thing (being that it's forked from it).

You can set it to 1 and it'll take, however. For me (also migrating from MacOS), I was able to do this after I had loaded my databases. and it worked fine ... but that seems to have gone against the documentation as to the difference between 1 and 2. If mysql isn't happy with that, you might have to blank your database, set it to 1, and then re-load your data.

Joe H.
  • 1,897
  • 12
  • 12