error when import database

bahadori.embi

Verified User
Joined
May 8, 2016
Messages
6
Location
https://t.me/pump_upp
hi,
i want import a sql file to database via ssh
i run this command :
mysql -uUSERNAME -pPASSWORD DATABASE_USER < DATABASE.sql

and get following error :
ERROR 1064 (42000) at line 3327: 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 'mysqldump: Error 2013: Lost connection to MySQL server during query when dumping' at line 1

then i using mysqldump and run this command :
mysqldump -uUSERNAME -pPASSWORD DATABASE_USER < DATABASE.sql

error :
mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table `filedata` at row: 43

how to resolve this problem ?
thank you
 
How did you take the backup?

Your mysqldump command have an error, it should have ">" not "<".

Also note, that DATABASE_USER is actually DATABASE_NAME

Regards
 
Back
Top