SQL error during install - charset=utf-8

PhilGP

Joined: 2008-04-16
Posts: 9
Posted: Sat, 2009-07-18 15:47

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.
I have MySQL v5.045 installed.

Any pointers?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sat, 2009-07-18 17:19

Did you FTP the files to your server? Try uploading again.

Are there any error messages in /gallery3/var/logs/

Post a link to phpinfo if that doesn't work.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
PhilGP

Joined: 2008-04-16
Posts: 9
Posted: Sat, 2009-07-18 19:38

Thanks.
I uploaded again - no change, nothing in the logs folder.
phpinfo

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sun, 2009-07-19 04:01

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?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
PhilGP

Joined: 2008-04-16
Posts: 9
Posted: Sun, 2009-07-19 06:46

I don't have access to php.ini so I set it in .htaccess - sorry, still no success.
Should I try an earlier version of G3?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sun, 2009-07-19 07:11

Memory limit is still 16MB, check your phpinfo. Contact your host to see if they will or you can increase that to 32MB
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
PhilGP

Joined: 2008-04-16
Posts: 9
Posted: Sun, 2009-07-19 10:53

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.
The 32Mb setting is in place for the G3 install but it still fails.

My G2 pages all work fine - even with the original memory at 16Mb.
Maybe this isn't a memory problem.

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.
Could there be a problem with the dbase if it is not empty during the install?

 
PhilGP

Joined: 2008-04-16
Posts: 9
Posted: Sun, 2009-07-19 11:15

update:

I tried Beta1 - and got ...

Quote:
Failed to create tables in your database:Unknown system variable 'character_set_client'

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sun, 2009-07-19 15:01

I'm surprised you have G2 running well with only 16MB of memory :) Though you are running an older version.

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
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2009-07-19 16:26

Try with the latest code; we changed the SQL format a little bit and it should be more backwards compatible.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!

 
PhilGP

Joined: 2008-04-16
Posts: 9
Posted: Sun, 2009-07-19 16:42

bharat;
Thats where I started. The latest code doesn't work for me.
There are no log files either.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sun, 2009-07-19 16:55

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.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2009-07-19 17:34

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?
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!

 
PhilGP

Joined: 2008-04-16
Posts: 9
Posted: Sun, 2009-07-19 19:27

I tried changing to CHARACTER SET .... same error
I removed the CHARSET part completely and got ...

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:
After checking the database content, it has created the following tables (I chose a prefix of 'dg_') ...
dg_access_caches
dg_access_intents
dg_caches
dg_comments
dg_graphics_rules
dg_groups
dg_groups_users
dg_incoming_translations

 
PhilGP

Joined: 2008-04-16
Posts: 9
Posted: Mon, 2009-07-20 11:27

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.
Sorry to have wasted your time on this.

EDIT:
XCalibre are moving the database to another server later today. In fact all of their other servers are on versions 5.0.27 or later. I was unlucky enough to have my database on the only server not yet upgraded ... and no plans to upgrade it soon either!

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2009-07-21 13:58

Ah ha! That would have been my first guess had it not been that you said you were on version 5+ earlier :-)
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!

 
PhilGP

Joined: 2008-04-16
Posts: 9
Posted: Tue, 2009-07-21 14:14

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.
I look forward to the full release and I'll provide feedback on issues when I find them.