472,119 Members | 1,908 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

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 2230
>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
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.