migrate database problem

Permalink
I'm tried move C5 database (export with MysqlAdmin). Database create without any error. C5 has problem in code where implicit used Uppercase first Letter in select condition in table name
select cfValue from Config where cfKey = 'ENABLE_CACHE';
table COnfig exist in schema but name is config not Config.
All tables in schema are lowercase but all tables name in C5 code has first letter UpperCase


this is output from starting C5
Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysql error: [1146: Table 'nh412602db.Config' doesn't exist] in EXECUTE("select cfValue from Config where cfKey = 'ENABLE_CACHE'") '

 
an224 replied on at Permalink Reply
file concrete/models/config.php line 68
an224 replied on at Permalink Reply
Problem is in configuration MYSQL server. MYSQL server has internal variable lower_case_table_names=1 when all table name are stored as lowercase. This is problem when developer database are on the different HW and OS as production version. When you want to migrate between databases you must create empty C5 database and make insert your data to new database
tagey replied on at Permalink Reply
i have a similar problem i'm getting this message after i upgrade Whos' online plug in, i think i'm going to erase everythink and install it all over again!: Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysql error: [1146: Table 'tageytvc_cnc2.btWhosOnline_session_theoryb' doesn't exist] in EXECUTE
jordanlev replied on at Permalink Reply
jordanlev
It's true that you should set "lower_case_table_names=2" in your mysql database on windows (put it in the "my.ini" config file).

But if you've already created the database it's too late -- so you'll need to run a script to rename all of the tables if you don't want to uninstall/reinstall the database. See:

http://www.concrete5.org/community/forums/installation/move-site/#2...

and

http://www.concrete5.org/community/forums/installation/uncaught_exc...
mixedpixel replied on at Permalink Reply
mixedpixel
If you have problems with tables names after moving your site, check this add-on:
http://www.concrete5.org/marketplace/addons/mysql-case-insensitive-...

how it works:
http://www.concrete5.org/files/1112/9040/0018/MySQLCaseInsensitiveH...