CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • SQL Script Error
Pages: [1]

Author Topic: SQL Script Error  (Read 7298 times)

T2K

  • Guest
SQL Script Error
May 08, 2007, 03:30:41 pm
When attempting to install CiviCRM I get to the point where I'm supposed to run the civicrm_41.mysql script and it rhows the following error...

ERROR 1064 (00000) at line 111: 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 CHARACTER SET utf8 COLLATE utf8_unicode_ci' at line 17

I attempted to remove the COLLATE part and it did nothing. I also attempted to change ENGINE to TYPE on the line and to use CHARSET=utf8 as well. I'm using MySQL 5.0 on 1and1 webhosting.

Any ideas?

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: SQL Script Error
May 08, 2007, 10:43:03 pm
That’s very strange. Which exact MySQL version are you using (the file works fine for me on 5.0.38)?

Can you try to strip the CREATE TABLE query down to the smallest chunk that actually throws this error?
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

T2K

  • Guest
Re: SQL Script Error
May 09, 2007, 02:29:17 pm
It does this with both the COLLATE and DEFAULT CHARACTER SET enabled, if I remove both of them it stops throwing the error, though I get a different error from another table creation query when I do. I'd like to try and solve this one first though...

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: SQL Script Error
May 10, 2007, 12:55:51 am
That’s very strange. Can you check what exact MySQL version are you using? a SELECT VERSION() query should tell you this.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: SQL Script Error
May 10, 2007, 12:56:43 am
Also, what’s the other error? (It might be related, as maybe the error is in the syntax someplace else in the SQL file.)
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

T2K

  • Guest
Re: SQL Script Error
May 11, 2007, 05:02:47 pm
It returns 4.0.27-standard-log

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: SQL Script Error
May 11, 2007, 06:15:51 pm

I'm pretty sure the 4.0.x series has poor i18n / utf8 support.

CiviCRM v1.7 also has dropped support for mysql 4.0.x and below

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

T2K

  • Guest
Re: SQL Script Error
May 11, 2007, 06:16:49 pm
Ah okay, thanks. I just loaded up 1.6 and am working with that. Hopefully 1and1 will move to a newer MySQL version soon...

JosiahW

  • Guest
Re: SQL Script Error
May 20, 2007, 11:04:10 pm
Hello,
I have 1and1 as well. I am getting the same error from phpmyadmin. The phpmyadmin version is 2.6.4-pl3.
Here is the exact error in full that I receive.

Quote
Error
SQL query:

-- /*******************************************************
-- *
-- * Create new tables
-- *
-- *******************************************************/
-- /*******************************************************
-- *
-- * civicrm_country
-- *
-- *******************************************************/
CREATE TABLE civicrm_country(

id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Country Id',
name varchar( 64 ) COMMENT 'Country Name',
iso_code char( 2 ) COMMENT 'ISO Code',
country_code varchar( 4 ) COMMENT 'National prefix to be used when dialing TO this country.',
idd_prefix varchar( 4 ) COMMENT 'International direct dialing prefix from within the country TO another country',
ndd_prefix varchar( 4 ) COMMENT 'Access prefix to call within a country to a different area',
PRIMARY KEY ( id ) ,
UNIQUE INDEX UI_name_iso_code( name, iso_code )
) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci

MySQL said: 

#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 'DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci' at line 30 

1and1 uses mysql 5 right now. I am not sure exactly which version besides 5 because that is all it says.

Any help would be great.

Thank you in advance,
JosiahW

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: SQL Script Error
May 21, 2007, 12:09:13 am
Quote from: JosiahW on May 20, 2007, 11:04:10 pm
Quote
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 'DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci' at line 30 

1and1 uses mysql 5 right now. I am not sure exactly which version besides 5 because that is all it says.

Are you sure that you’re on a MySQL 5 instance? The above error suggests it’s a MySQL 4.0 database.

The easiest way is to click on the SQL ‘Query window’ button in PHPMyAdmin and enter
SELECT VERSION();
query there; the result should tell you the exact version of MySQL you’re running.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

JosiahW

  • Guest
Re: SQL Script Error
May 22, 2007, 04:36:15 pm
Nope you are correct. I have versio 4.0.27. My server providor only supports this version and I can not get version 5. Can I still use CiviCRM or am I going to have to wait until they do support 5?

Thank you,
Josiah

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: SQL Script Error
May 22, 2007, 09:25:59 pm
CiviCRM 1.7 works only with MySQL 4.1+, and CiviCRM 2 will only work with MySQL 5+.

The last version that worked with MySQL 4.0 was CiviCRM 1.6, but we don’t support it fully any more (and MySQL AB does not support MySQL 4.0, for that matter).
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • SQL Script Error

This forum was archived on 2017-11-26.