简体   繁体   中英

Getting SQL syntax error while importing table into database using Mysql

I am getting the following error while trying to import the table into database using MySQL on my Ubuntu machine.

Error:

ERROR 1064 (42000): 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 'mysql -u root -p spesh db_hit_type < /var/www/html/spesh.com/public_html/portal/' at line 1

I was using the following command to import the table data.

mysql -u root -p spesh db_hit_type < /var/www/html/spesh.com/public_html/portal/js/db_hit_type.sql;

I think that you try to run this command in MySQL command promt or in some client program. You need to run mysql program from server console, not from mysql console.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM