Hello, guest. We have noticed that you are not registered at this bug tracker. Your experience will be greatly enhanced if you log in. To do so, you first must register by clicking on the Register tab at the top. If you are already registered, you can login at the Login tab.
Syndicate Syndicate Listing Display Search Login/Register
Bug Id ?
144
Reporter ?
Paul
Bugdar / 1.2.2
Status ?
Unconfirmed
Severity ?
Minor
Duplicate Of ?
- none -
Fixed in Revision ?
Mstone ?
Summary ?
Install error : SQL Syntax ALTER DATABASE web36-bugtrack COLLATE utf8_general_ci
Report Time ?
November 12, 2008 09:24 AM
Assignment ?
Resolution ?
Open
Priority ?
Normal
Dependencies ?
- none -
Mstone (old) ?
1.3.0


Votes
For: 0 (0%)
Against: 0 (0%)
Total: 0

November 12, 2008 09:24 AM Paul
On installation this error is being generated by install.php
Any ideas? You don't think it's a problem with the hyphenated database name do you? Can't change it as it's set by most hosting...

» Query:
ALTER DATABASE web36-bugtrack COLLATE utf8_general_ci

» Error Number: 1064
» Error Message: 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 '-bugtrack COLLATE utf8_general_ci' at line 1
» Additional Notes: Invalid SQL query

November 12, 2008 09:29 AM Paul
If a database name contains a hyphen in MySQL 4.1.x you need to enclose the database name with back-ticks `.

So in install.php change this

$db->query("ALTER DATABASE $database COLLATE $COLLATION");

to this

$db->query("ALTER DATABASE `$database` COLLATE $COLLATION");

It works!

On February 14, 2009 05:13 AM, Robert changed: