MySQL error 1064 when installing C5 5.3.0
I'm trying to install C5 5.3.0 on a remote server but I'm getting the following error when I've entered what I believe to be the correct details into the Personal and Database Information panels:
mysql error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-expose_01' at line 1] in EXECUTE("show create database web248-expose_01")
I've installed the previous version of C5 with the same host recently without any issues. Is this an issue with 5.3.0?
The server's running MySQL 5.0.67 and PHP 5.2.9 and all the items in the Testing Required/Optional Items panel on the installation page of C5 are ticked.
Any ideas or suggestions would be greatly appreciated.
Or you can edit the install files. I had the same problem.
Thanks for your reply.
The database name is automatically created by the host when a new one is created, so editing its name to remove the underscore is impossible.
Can you give me a pointer on which install files to edit so that c5 allows the underscore?
Thanks for your continued help.
I downloaded and installed version 5.1.1 (would have used 5.2.1 but it's not available for download at present). That gave me no issues with the naming of the database, so then I upgraded from that version to 5.3.0, with total success.
Still, it would be good to know how to avoid this rather convoluted install process in future, by knowing what install files need altering to allow the underscore.
i have tried to install concrete 18.104.22.168. new as i do have problems with the upgrading process from 5.2. to 5.3.1.
i dont think it can be the solution first to install v5.2. then upgrade (with lots of problems) to 5.3.1.
when i try to mak ea new installation i get the following error message. i know its caused by the dash automatically generated by my host for the database name.
mysql error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-cms' at line 1] in EXECUTE("show create database db0000000-cms")
have you any fix yet? would be highly appreciated. Thanks
Just download it and replace
Next version of c5 should not have this problem.
I'm trying to access this link but ask my login again and fail!
I love to try this patch.
Can you help me?
this bug may be old, but it still seems to be crawling around. I upgraded from 5.2.something to 22.214.171.124 German version for a customer, and I get the same message.
I checked the files database.php, backup.php and a few more in concrete/libraries, but I can’t find anything noticeable.
The database names have dashes in my case, too, and the hoster does not allow free naming.
Does anyone have an idea what I could do? Thanks in advance.
A database backup via the Concrete5 backend is not possible.
But typing the command
SHOW TABLES FROM `db10548395-concrete5`
It would also suit my needs to know which is the file that controls the database backup, so I could fix it myself. I know, I know, you should never change the core files, but I need a quick solution.
Uh, forgot to say the version I’ve installed is the current release 126.96.36.199!
Change line 13 in /concrete5/concrete/libraries/backup.php from
$arr_tables = $db->getCol("SHOW TABLES FROM " . DB_DATABASE);
$arr_tables = $db->getCol("SHOW TABLES FROM `" . DB_DATABASE . "`");
Thanks to all for their help and engagement!