469,898 Members | 1,792 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

Mysql Restore fails with strange error message

I'm trying to migrate a Wiki database to another server. I have zero
problems backing up the database using multiple methods. But the Mysql
restore fails with:

ERROR 1064 at line 52: 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 'CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
UNIQUE KEY `cl

The SQL code is:
CREATE TABLE `categorylinks` (
`cl_from` int(8) unsigned NOT NULL default '0',
`cl_to` varchar(255) NOT NULL default '',
`cl_sortkey` varchar(86) NOT NULL default '',
`cl_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update
CURRE
NT_TIMESTAMP,
UNIQUE KEY `cl_from` (`cl_from`,`cl_to`),
KEY `cl_sortkey` (`cl_to`,`cl_sortkey`),
KEY `cl_timestamp` (`cl_to`,`cl_timestamp`)
) ENGINE=InnoDB ;

Google searches on Error 1064 result in "using Keywords" in SQL
statements.

The restore command is: mysql -u root wikidb < wdb.sql

Anyone have any ideas?

Jun 10 '06 #1
1 2183
>The SQL code is:
CREATE TABLE `categorylinks` (
`cl_from` int(8) unsigned NOT NULL default '0',
`cl_to` varchar(255) NOT NULL default '',
`cl_sortkey` varchar(86) NOT NULL default '',
`cl_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update
CURRE
NT_TIMESTAMP,
What version of MySQL did you get this from? What version are you restoring
to? As I recall, the above syntax became valid somewhere around 4.1 .
UNIQUE KEY `cl_from` (`cl_from`,`cl_to`),
KEY `cl_sortkey` (`cl_to`,`cl_sortkey`),
KEY `cl_timestamp` (`cl_to`,`cl_timestamp`)
) ENGINE=InnoDB ;


Gordon L. Burditt
Jun 10 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by James | last post: by
5 posts views Thread by FoxRunner | last post: by
4 posts views Thread by news | last post: by
3 posts views Thread by butatista | last post: by
13 posts views Thread by Andy K | last post: by
3 posts views Thread by John | last post: by
7 posts views Thread by Paul | last post: by
reply views Thread by mitrofun63 | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.