![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
WootWootCash.com
Join Date: Jul 2004
Location: Australia
Posts: 10,900
|
Mysql Question
I'm trying to re-import a mysql dump, however it keeps giving me errors at this particular table:
CREATE TABLE `phpads_images` ( `filename` varchar(128) NOT NULL default '', `contents` mediumblob NOT NULL, `t_stamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, PRIMARY KEY (`filename`) ) ENGINE=INNODB DEFAULT CHARSET=latin1; The error I'm receiving is: "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 'defaultCURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY " Anybody have any ideas? Cheers |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 | |
Confirmed User
Join Date: Jun 2003
Location: Northern CA
Posts: 109
|
Quote:
http://dev.mysql.com/doc/refman/5.0/...stamp-4-1.html Change that line to plain 'ole ......, `t_stamp` timestamp,...... ... and see if it works as you expect. It should. The ' DEFAULT CHARSET=latin1' can cause problems as well if the dump was from an older version of MySQL headed into a newer version, or the dump was generated by a 3rd-party program/script that presumes it should be there. Try dumping it as well. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Registered User
Join Date: Nov 2005
Posts: 31
|
try and just put quotes around the timestamp part.
`t_stamp` timestamp NOT NULL default 'CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP', Should fix you up. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Jan 2005
Posts: 8,920
|
First remove DEFAULT CHARSET=latin1 and try again.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Apr 2003
Location: Canada
Posts: 354
|
mysqldump --help ... look at --compatible
I'm pretty sure this is the reason it's happening, solution was posted above. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Too lazy to set a custom title
Join Date: Jan 2002
Location: Holland
Posts: 9,870
|
you use php myadmin?
this is the right way CREATE TABLE `phpads_images` ( `filename` varchar(128) NOT NULL default '', `contents` mediumblob NOT NULL, `t_stamp` timestamp NOT NULL , PRIMARY KEY (`filename`) ) ENGINE=INNODB DEFAULT CHARSET=latin1;
__________________
Don't let greediness blur your vision | You gotta let some shit slide icq - 441-456-888 |
![]() |
![]() ![]() ![]() ![]() ![]() |