I has a MySQL database set up locally with phpmyadmin. I wanted to use the available tables in a remote database, so I exported the SQL from phpmyadmin and tried to run it on the other DB.
This is what the export gave me:
CREATE TABLE IF NOT EXISTS `messages` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`Title` varchar(255) NOT NULL,
`Message` text NOT NULL,
`MsgType` varchar(10) DEFAULT NULL,
`Important` int(1) NOT NULL DEFAULT '0',
`Poster` int(5) DEFAULT NULL,
`Date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=37 ;
However, now it complains that there is a parse error
near ‘CURRENT_TIMESTAMP, PRIMARY KEY (
ID) ) ENGINE=MyISAM DEFA”.
It worked on my local db, why not here? What changed and how do I fix it?
EDIT: I’ve tried using other functions like NOW() or CURDATE() as well, same problem.
From the documentation:
MySQL 4.0.24 is incredibly outdated, at this point – consider migrating to a version that starts with a 5. 🙂