Mass Import .tar.gz SQL Files

Vs Nu

Well-Known Member
Jul 17, 2015
161
12
68
India
cPanel Access Level
Root Administrator
Hello,
As our server InnoDB has been corrupted i had copied the MySQL data directory and taken all the database backups as separate file

The backups files are like username_dbname.sql.gz

is there any command for bulk import from root end ?

I tried to do the following thing but got the error

mysql user_website < user_website.sql.gz
ERROR: ASCII '\0' appeared in the statement, but this is not allowed unless option --binary-mode is enabled and mysql is run in non-interactive mode. Set --binary-mode to 1 if ASCII '\0' is expected. Query: ''.
 
Last edited by a moderator:

kodeslogic

Well-Known Member
PartnerNOC
Apr 26, 2020
527
247
118
IN
cPanel Access Level
Root Administrator
In the past, once I faced the same error, what worked for me was unzipping the backup file and then importing it. Before trying, make sure to take a copy of your user_website.sql.gz file.
 
  • Like
Reactions: cPRex