Gerico
Gerico

Reputation: 5179

MYSQL import syntax error 1064 on digitalocean vps

I've exported my wordpress sql database from my old host. I'm then trying to import it to my new VPS - the file is on the server and i run:

mysql -h localhost -u username -p wpdatabase < wpdatabase.sql.gz

I then get this error: ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server versions for the right syntax to use near '? (there is actually like a down arrow symbol between the quote and the question mark.

I've been at this for hours. I'm totally lost, help appreciated.

Upvotes: 0

Views: 504

Answers (2)

Marcos Fonseca
Marcos Fonseca

Reputation: 11

This error happened to me due to a validation of the version of mysql that does not let insert field or table with less than 3 characters.

Upvotes: 1

Sam
Sam

Reputation: 2761

Login to mysql then type

USE database_name;

then

source path/wpdatabase.sql

Upvotes: 0

Related Questions