473,386 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 2281
>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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: James | last post by:
HI, I'm looking for a script that will allow users/admins to have a one click backup solution for a MYSQL Database.. 'BACK DATABASE' button, click and its done... The a restore option, that...
5
by: FoxRunner | last post by:
Hi folks, I got a script which restores a database. It works fine if it is running in my Query Analyzer. It fails when I put this script in an automated schedule using the SQL agent. This...
4
by: news | last post by:
Our production database in an exported textfil runs about 60 MB. Compressed that's about 9 MB. I'm trying to import the export into another machine running FC3 and mySQL 11.18, and it appears as...
3
by: butatista | last post by:
Please help SQL Server 2000 Standard I am trying to restore databases on my server and am unable to get them to restore using the database option. For example, the location of my backup...
13
by: Andy K | last post by:
Hi , I'm wondering what's going on with a restore I'm trying to do . My DB2 version is a 7.2 on a Linux RH ES 2.1 . I've copy a recent backup that was on NAS for a test on my machine . I...
3
by: John | last post by:
A colleague of mine is having problems on our system. He is running a mysql command on his local setup which runs 4.1.7 -nt and which works fine. However this fails when uploaded to the server...
7
by: Paul | last post by:
I recently installed php 4.4.4 using windows binaries on Windows XP Pro. I also installed MySQL 4.1. I usually use Pear DB but I tried MDB2 and it worked fine until a client uses a different...
4
by: Geethu03 | last post by:
Hi My Question is how can i store the database from one System to another System? I have a database with large no of data's.I want to store these data to another system with all data. I...
0
by: mitrofun63 | last post by:
Hello. On my production site i have DB2 9.1.2 database configured for archiving logs and making backup through TSM Data Protection for DB2 UDB The LOGARCHMETH1 parameter is set to ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.