I’ve exported sql from a MySQL server (version from the exported file says: 5.1.41) and am trying to run the exported sql on a new MySQL server which in the debug says the client version is ‘5.1.41’ but server_info paramater says ‘5.5.15-log’ (I’m using PHP MySQLi extension).
I am getting the following error:
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 'CREATE TABLE `mojo_global_regions` ( id int(11) NOT NULL AUTO_INCREMENT, reg' at line 22
And here is the chunk of code it is complaining about:
CREATE TABLE IF NOT EXISTS `mojo_global_regions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`region_id` varchar(100) DEFAULT '',
`region_name` varchar(100) DEFAULT '',
`layout_id` int(5) DEFAULT NULL,
`content` text,
PRIMARY KEY (`id`),
KEY `region_id` (`region_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=19 ;
Can anyone see what is wrong with this syntax?
Thanks in advance!
It looks like there is a statement before the CREATE TABLE that didn’t get terminated properly.