Bluehost.com Web Hosting $6.95

Error with MySQL Database

This is a discussion on Error with MySQL Database within the MySQL Database forums, part of the Database Forums category; Hi! I'd like to update my server. I have a Moodle System and I have done a backup of ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-31-2007
cirudinezidane@gmail.com
 
Posts: n/a
Default Error with MySQL Database

Hi!

I'd like to update my server. I have a Moodle System and I have done a
backup of its MySQL database(version: 4.0.21) "mysqldump -u root -p -
A > moodle.sql". Then I have tried importing database in other server
( 5.0.24a-Debian) "mysql -u root -p moodle < moodle.sql but I have had
an error:

ERROR 1064 (42000) at line 1132369: 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 'release int(2) unsigned default '0',
display int(4) unsigned NOT NULL default ' at line 8



CREATE TABLE mdl_choice (
id int(10) unsigned NOT NULL auto_increment,
course int(10) unsigned NOT NULL default '0',
name varchar(255) NOT NULL default '',
text text NOT NULL,
format tinyint(2) unsigned NOT NULL default '0',
publish tinyint(2) unsigned NOT NULL default '0',
release int(2) unsigned default '0',
display int(4) unsigned NOT NULL default '0',
allowupdate int(2) unsigned default '0',
showunanswered tinyint(2) unsigned NOT NULL default '0',
limitanswers tinyint(3) unsigned NOT NULL default '0',
timeopen int(10) unsigned default '0',
timeclose int(10) unsigned default '0',
timemodified int(10) unsigned NOT NULL default '0',
PRIMARY KEY (id),
UNIQUE KEY id (id),
KEY course (course)
) ENGINE=MyISAM COMMENT='Available choices are stored here.';


What is the problem?

Greetings for all!!

Sergio

Reply With Quote
  #2 (permalink)  
Old 01-31-2007
Captain Paralytic
 
Posts: n/a
Default Re: Error with MySQL Database

On 31 Jan, 12:01, "cirudinezid...@gmail.com"
<cirudinezid...@gmail.com> wrote:
> Hi!
>
> I'd like to update my server. I have a Moodle System and I have done a
> backup of its MySQL database(version: 4.0.21) "mysqldump -u root -p -
> A > moodle.sql". Then I have tried importing database in other server
> ( 5.0.24a-Debian) "mysql -u root -p moodle < moodle.sql but I have had
> an error:
>
> ERROR 1064 (42000) at line 1132369: 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 'release int(2) unsigned default '0',
> display int(4) unsigned NOT NULL default ' at line 8
>
> CREATE TABLE mdl_choice (
> id int(10) unsigned NOT NULL auto_increment,
> course int(10) unsigned NOT NULL default '0',
> name varchar(255) NOT NULL default '',
> text text NOT NULL,
> format tinyint(2) unsigned NOT NULL default '0',
> publish tinyint(2) unsigned NOT NULL default '0',
> release int(2) unsigned default '0',
> display int(4) unsigned NOT NULL default '0',
> allowupdate int(2) unsigned default '0',
> showunanswered tinyint(2) unsigned NOT NULL default '0',
> limitanswers tinyint(3) unsigned NOT NULL default '0',
> timeopen int(10) unsigned default '0',
> timeclose int(10) unsigned default '0',
> timemodified int(10) unsigned NOT NULL default '0',
> PRIMARY KEY (id),
> UNIQUE KEY id (id),
> KEY course (course)
> ) ENGINE=MyISAM COMMENT='Available choices are stored here.';
>
> What is the problem?
>
> Greetings for all!!
>
> Sergio


The problem is that "RELEASE" is a reserved word (see: http://
dev.mysql.com/doc/refman/5.0/en/reserved-words.html)

Try adding the --quote-names option to your mysqldump

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 04:19 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0