Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Errror 3554 while importing a .sql file

ERROR 3554 (HY000) at line 318: Access to system table 'mysql.innodb_index_stats' is rejected.

Operation failed with exitcode 1 11:27:20 Import of C:\Users\VELOXSHOP\Downloads\dumpfilename.sql has finished with 1 errors

How do I allow acess to that table?

like image 263
Baitalon Avatar asked Nov 01 '18 15:11

Baitalon


2 Answers

You'll need to make a new dump/backup of your old database, this time remove those innodb tables from your target. You can do this by using --ignore-table parameter on the command line:

mysqldump -u root -p --all-databases --ignore-table=mysql.innodb_index_stats --ignore-table=mysql.innodb_table_stats > dump.sql

Then you should be able to restore your backup on the new database using the command below:

mysql -u root -p < dump.sql
like image 172
Pedro Alvares Avatar answered Sep 18 '22 10:09

Pedro Alvares


You can also circumvent this error using the --force option which causes mysql client to continue despite errors.

like image 30
Prazlin Avatar answered Sep 19 '22 10:09

Prazlin