Question

So, I have been developing a project for a while. Up until now I have been working under Windows 7 using VirtualBox, using a virtual Linux server. Now I would like to work under a Windows 8 machine without the pain of assigning memory to a Virtual Linux machine.

The project uses a MySQL database and I exported it and then tried to import it into my Windows environment. Apparently some old tables were created with the names of Message and message, respectively. This did not cause any problems in my virtual Linux server nor on the live Linux server, as the table names were case-sensitive, therefore it was perfectly valid to have two similar names for the tables, namely Message and message. However, under Windows 8, using wamp, I cannot import the database.

I have been trying to set up a value in my.ini as follows:

lower_case_table_names=2

however, when I tried to import the database again, my try did not succeed, as the table name of Message seemed to be in conflict with the table name of message yet again. I expected that the setting would allow me to create two tables, one with the name of Message and another with the name of message. However, the setting did not help at all (yes, I have restarted mysql service and the wamp alltogether, but no luck, I simply cannot import the database). I have also checked whether the setting of lower_case_table_names=2 was applied and yes, it was applied. However, still, I cannot create the Message and the message tables in the database. In the symphony of my total desperation I have tried the setting of

lower_case_table_names=0

as well, but no luck either.

So, it is either me, or this setting is not working (however, it was marked to be the solution in many similar questions). MySQL Server version is 5.5.24.

So, the question is: can I resolve in the MySQL server used by wamp to import a database having table names, such as message and Message and if so, how?

If there is no solution working (at least at my end) I will have to consider two possible solutions:

  1. Install VirtualBox (sigh) on my new laptop and work on this computer in the same style as on my old one.

  2. Modify the name of one of the tables in the database and modify all its references in the project, deploy it and THEN to export and import the database, without having both the Message and the message table.

I know it was not wise to create the message and the Message tables in the same database, but I inherited the project this way. I have two alternative solutions if there is no easy-peasy solution, but I am really interested if there is an easy solution of modifying a setting.

Thank you all in advance.

Was it helpful?

Solution

I have resolved the issue by:

  1. Creating a table called Messages

  2. Inserting all the records found in Message into Messages

  3. Dropping Message

  4. Modifying all the references to Message so that they reference now on Messages

If anybody encounters this problem, don't wait for answers, I have been waiting for 14 hours, so you will lose your time as well. Instead, bite the bullet and use my idea, or use a virtual Linux machine to solve your issue.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top