I have a mysql database I have downloaded from my online server and trying to import on my local mysql but its not working showing this syntax error. I cannot find any errors in this query
This is the error:
1064 - 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 'USING BTREE,
idx_p_id) USING BTREE,
KEY ' at line 27
PRIMARY KEY (`a_id`),
UNIQUE KEY `idx_a_id` (`a_id`) USING BTREE,
KEY `idx_p_id` (`p_id`) USING BTREE,
KEY `idx_m_id` (`m_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
Your mysql server version is older and not compatible with the one where the dump was created.
Try to upgrade your mysql server or to export the dump using the
--compatible option of mysqldump.
You probably need this:
mysqldump --compatible=mysql40 ...
You also have the option to import the dump to a newer server which you can create locally and re-export there using the comopatible option.
I have also seen people search and replacing stuff in their mysql dump files but this is an ugly approach, but might work for you if you have just this incompatibility.
also format your text a little bit and accept some answers if you want people to help you.