David
David

Reputation: 321

ERROR 1030 (HY000) at line 25: Got error 168 from storage engine

I'm trying to import sql to my database.

I'm using Ubuntu OS.

Here is an error:

david@david-VirtualBox:~$ mysql -u root -p test_project < db.sql
Enter password: 
ERROR 1030 (HY000) at line 25: Got error 168 from storage engine`

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| testBase           |
| test_project       |
+--------------------+
6 rows in set (0,05 sec)

mysql> use test_project;
Database changed

mysql> show tables;
Empty set (0,00 sec)

Any ideas how to fix it? I've tried to google this problem, but couldn't find anything useful.

Thank you for your answers.

Upvotes: 8

Views: 39781

Answers (4)

user3008410
user3008410

Reputation: 848

I just wanted to say that I too was getting this error but got past it by commenting out the variables below. I cannot tell you the combination that was causing it because I am in dire straits trying to get this K8s image up and running. One or a combo of these commented-out variables is the cause.

  - args:
    - --max-connections=1001
    - --lower-case-table-names=1
    - --max-allowed-packet=128M
    #- --innodb_data_file_path=ibdata1:10M:autoextend:max:512M
    #- --innodb_buffer_pool_size=3G
    #- --innodb_log_buffer_size=1024M
    #- --innodb_log_file_size=2G
    #- --innodb_write_io_threads=18
    #- --innodb_flush_log_at_trx_commit=0
    #- --innodb_doublewrite=0        
    #- --innodb_force_recovery=1
    #- --tmp_table_size=256M
    #- --max_heap_table_size=256M

Upvotes: 0

Ryan Shillington
Ryan Shillington

Reputation: 25107

Look at your MySQL error logs. When I did that, I saw a bunch of messages like:

2020-06-05T22:40:16.305594Z 57444 [Warning] InnoDB: Tablespace 'client_sg_AdminItUS/SomeTable' exists in the cache with id 4982441 != 5000680

I dropped the bad DB (this is a test server) and everything is fine now.

drop database client_sg_AdminItUS;

Upvotes: 0

grinderX19
grinderX19

Reputation: 594

Did you have test_project already before importing?

I was getting the same error after failed attempt to drop the schema and deleting the schema dir.

The only solution that worked for me was to drop the existing schema with the same name, delete related dir under /var/lib/mysql/, then import.

See this great answer for more details.

Upvotes: 0

Barber
Barber

Reputation: 59

I ran into this error as well and it turned out that the hard disk drive on the server was full.

I was trying to truncate a table. I couldn't do it through the web script or through MySQL Workbench.

After shaking my fist at the server admin I deleted some temporary files, as I had to wait for his availability, and I was then able to perform my truncate.

Upvotes: 5

Related Questions