Error 1064 restore backup SQL file on MySQL

Simon Bennett
Simon Bennett ยท Feb 01, 2020

The ERROR 1064 (42000) is an error MySQL caused by bad syntax, as in mysql can not understand your command.

Some examples and how to fix them, once you have opened the MySQL client and got the to `mysql> prompt`

create database snapshooter-example;

Since there is a hyphen in the name of the database MySQL will return the 1062 (42000) error. In this case it can be fixed by wrapping the database name in quotes.

create database "snapshooter-example";