Skip to content
Advertisement

ERROR 1064 (42000) while creating a table and database in mysql

I am getting following error while executing my mysql query via a .sql script, but couldn’t tell what is causing this error.

I am using mysql Ver 8.0.23 for macos10.15 on x86_64 (MySQL Community Server – GPL)

Error :

ERROR 1064 (42000) at line 1: 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 ‘/Users/shivamshekhar/Documents/Others/chat-app-backend/scripts/mysql/db.sql’ at line 1

.sql file

Terminal command :

Advertisement

Answer

-e command means “execute the command”, not “load and execute source file”.

Send the source file to the client via stdin:

Or provide according command to the client:

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement