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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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 |