MySQL setup on IceWarp



1 comment

  • Avatar
    Shaun O'Neil

    I installed a new Ubuntu MySQL 5.7 server.
    I created the databases like above and let icewarp create the TABLES.
    I noticed Icewarp used capital letters in the table names.
    After switching to the new mysql I noticed that queries used lowercase tablenames and subsequently I got SQL errrors like this:

    GW Error executing query: Table 'icewarp_groupware.event' doesn't exist SELECT EVN_ID, Evn_MetaData, EvnNote FROM event WHERE (EvnGRP_ID = '4c30b53607ad') AND (EvnFolder = 'Documents') AND (EvnLinkID = '508f9f291d88')

    I investigated and Table was "Event" not "event"... and ofcourse that doesnt work.

    From MySQL 5.7 Manual:

    You have two options:

    • Use lower_case_table_names=1 on all systems. The main disadvantage with this is that when you use SHOW TABLES or SHOW DATABASES, you do not see the names in their original lettercase.

    • Use lower_case_table_names=0 on Unix and lower_case_table_names=2 on Windows. This preserves the lettercase of database and table names. The disadvantage of this is that you must ensure that your statements always refer to your database and table names with the correct lettercase on Windows. If you transfer your statements to Unix, where lettercase is significant, they do not work if the lettercase is incorrect.

      Exception: If you are using InnoDB tables and you are trying to avoid these data transfer problems, you should set lower_case_table_names to 1 on all platforms to force names to be converted to lowercase.

    So I proceded to make my MySQL server case insensitive using: lower_case_table_names=1

    Then I dropped all tables and let Icewarp recreate all TABLES.
    I checked that all were lowercase in MySQL and on harddisk.

    After all that no more Table doesn't exist errrors...



    Comment actions Permalink

Please sign in to leave a comment.