I’m moving my localhost based website to the live server, I uploaded all the files to the server. After that, I created a new database, when I came to import my old database SQL file that I exported from the localhost, I got this 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 ‘?’ at line 2
Line 2 in my SQL file :
— version 4.1.14
I think your server mysql is older version. Try to use any plugin to move your localhost wordpress site to server
plugins
https://wordpress.org/plugins/duplicator/
and
https://ithemes.com/purchase/backupbuddy/
try any of these two.