无法从 phpMyAdmin 以及命令行导入 MySql 数据库

无法从 phpMyAdmin 以及命令行导入 MySql 数据库

好吧,我尝试导入小型数据库,成功了。但是,当我要导入大型数据库时,phpMyadmin 显示以下错误。


Static analysis:

1 errors were found during analysis.

    Missing expression. (near "ON" at position 25)

SQL query: Edit Edit

SET FOREIGN_KEY_CHECKS = ON;

MySQL said: Documentation
#2006 - MySQL server has gone away

在此处输入图片描述

我必须再次登录。当我查看日志文件时/var/log/mysql/error.log

2022-01-28T10:52:50.467847Z 0 [ERROR] [MY-013183] 
[InnoDB] Assertion failure: ddl0builder.cc:1495:n >= IO_BLOCK_SIZE thread 140213208729344
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
10:52:50 UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0 thread_stack 0x100000
2022-01-28T10:52:50.471914Z 0 [ERROR] [MY-013183] 
[InnoDB] Assertion failure: ddl0buffer.cc:204:ptr < bounds.second thread 140213217122048

当我尝试使用命令行导入数据库时​​,它显示以下错误 在此处输入图片描述

lochan@lochan-Inspiron-5593:~$ mysql -u root -p wp_test < ~/Downloads/wp_ndw_staging.sql
Enter password: 
ERROR 2013 (HY000) at line 3429: Lost connection to MySQL server during query

我的参数php.ini如下

post_max_size = 1500M
upload_max_filesize = 1500M

我尝试将恢复参数放在/etc/mysql/mysql.conf.d/mysqld.cnf

[mysqld]
innodb_force_recovery = 1

我尝试在mysqld.cnf文件中进行跟踪,但没有效果。

key_buffer_size = 1600M
max_allowed_packet  = 6400M

答案1

我备份了所有数据库,卸载了 SQL Server 和所有与 SQL Server 相关的软件包,然后重新安装它们,一切正常。

相关内容