Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mySQL Backup Syntax Error

Status
Not open for further replies.

webcore

Technical User
Jan 17, 2003
5
GB
Hi there

We are currently using a links indexing script on our site. A few months backup our hosting company went pair shaped and our site went down for a couple of weeks. Luckily we had a cron job set to backup our mySQL database, which our whole site is based upon.

However upon attempting to upload the backup file via phpmyAadmin V 2.5.2, we are presented with the following error:

--------------------------------------

Error

SQL-query :

--
------------------------------------------------------- --
--
--
CREATE TABLE category(

lcat_id smallint( 5 ) unsigned NOT NULL AUTO_INCREMENT ,
lcat_name varchar( 30 ) NOT NULL default '',
sub_cat int( 11 ) NOT NULL default '0',
PRIMARY KEY ( lcat_id )
) TYPE = MYISAM

MySQL said:


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
---------------------------------------

Any help would be greatly appreciated!



Web Design Beyond Limitations....
 
As it says, refer to the manual for your version. Older versions required : TYPE = MYISAM however newer ones don't If I remember correctly.


______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
I think the default value for
lcat_name varchar( 30 ) NOT NULL default '',
is not correct. Take the default specification out and try again

lcat_name varchar( 30 ) NOT NULL


Bye

Qatqat

Life is what happens when you are making other plans.
 
I ran your script through against my test database and it worked.

I use MySQl 3.23.52

Perhaps your problem relates to the version that you are using.

Martin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top