SQL error during install - charset=utf-8
PhilGP
Joined: 2008-04-16
Posts: 9 |
![]() |
After using Gallery2 for a while I just checked for updates and I realised I have been missing out on Gallery3 testing. I am trying to install gallery3 Beta2 for the first time (in a seperate location to my previous G2 setup) and hit a problem at the very beginning of installation. It fails to create any tables and produces this error ... Quote:
Failed to create tables in your database: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 'DEFAULT CHARSET=utf-8' at line 11 The error is actually at line 14 of install.sql but I can't see anything wrong with it. Any pointers? |
|
nivekiam
![]()
Joined: 2002-12-10
Posts: 16504 |
![]() |
PhilGP
Joined: 2008-04-16
Posts: 9 |
![]() |
Thanks. |
|
nivekiam
![]()
Joined: 2002-12-10
Posts: 16504 |
![]() |
o.k. I've asked but haven't gotten an answer yet. I don't know if memory requirement have been set forth yet. But for G2 they were 32MB. Try increasing the available memory for PHP to 32MB and see if that works. FAQ: PHP memory_limit - Why do I get the error Allowed memory size of Xxx bytes exhausted? |
|
PhilGP
Joined: 2008-04-16
Posts: 9 |
![]() |
I don't have access to php.ini so I set it in .htaccess - sorry, still no success. |
|
nivekiam
![]()
Joined: 2002-12-10
Posts: 16504 |
![]() |
PhilGP
Joined: 2008-04-16
Posts: 9 |
![]() |
I am waiting for my host to reply. In the meantime I have modified .htaccess in the folder where my php page lives too and it does now show 32M. My G2 pages all work fine - even with the original memory at 16Mb. I akready have tables in my database (I only have the one). All existing tables have a g2_ prefix and I specified a g3_ prefix for the new install. |
|
PhilGP
Joined: 2008-04-16
Posts: 9 |
![]() |
update: I tried Beta1 - and got ... Quote:
Failed to create tables in your database:Unknown system variable 'character_set_client' |
|
nivekiam
![]()
Joined: 2002-12-10
Posts: 16504 |
![]() |
I'm surprised you have G2 running well with only 16MB of memory Did a little googling, looks like it's an issue with how either the database or your database server are configured. http://www.google.com/search?q=right+syntax+to+use+near+%27DEFAULT+CHARSET%3Dutf-8%27+at+line I'll do a bit more digging |
|
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
Try with the latest code; we changed the SQL format a little bit and it should be more backwards compatible. |
|
PhilGP
Joined: 2008-04-16
Posts: 9 |
![]() |
bharat; |
|
nivekiam
![]()
Joined: 2002-12-10
Posts: 16504 |
![]() |
The latest code from the git repository or the B2 download? The B2 download is already out of date, that's a packaged up milestone. See the links in Bharat's signature to upgrade to the latest code. |
|
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
Actually, I realize from inspecting the git tags that there's no difference; we haven't changed that stuff since the beta 2 release. I don't know why this is failing, though. http://dev.mysql.com/doc/refman/5.0/en/create-table.html indicates that DEFAULT CHARACTER SET is a legal table option, and that CHARSET is a valid synonym. You could try editing the install.sql and changing "CHARSET" to "CHARACTER SET" to see if that works. Or you could try removing it.. perhaps the problem is elsewhere and the error message is a red herring? |
|
PhilGP
Joined: 2008-04-16
Posts: 9 |
![]() |
I tried changing to CHARACTER SET .... same error Quote:
Failed to create tables in your database:Column length too big for column 'description' (max = 255); use BLOB or TEXT instead What sort of further questions could I ask my host (XCalibre)? edit: |
|
PhilGP
Joined: 2008-04-16
Posts: 9 |
![]() |
I have found the cause of my problems. Despite my phpinfo showing a version of 5.0.45 for MySQL, my database is actually hosted on a different server which uses version 4.1.20 - I should have realised when setting up the connection details as I had to specify the host name. I have no control over the location of the database. I am checking to see if I can get moved - or drop it and create a new one. Thanks for all the tips and help guys. EDIT: |
|
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
Ah ha! That would have been my first guess had it not been that you said you were on version 5+ earlier |
|
PhilGP
Joined: 2008-04-16
Posts: 9 |
![]() |
Well they moved it for me and I'm now using MySQL 5.0.22 (even though they said it would be 5.0.27 or higher) ... oh well. First comment - wow! The install had finished before I noticed. I was sure I had missed a stage so I wiped everything and started again - yes, just a few seconds and it's working. |
|