在 phpMyAdmin 中我可以看到所有数据库和表。但是当点击任何表格时我收到错误
错误 #1932 - 表“mytablename”在引擎中不存在
我在 Google 和 Stackoverflow 上尝试了很多解决方案建议,但没有任何帮助。有没有办法将数据提取为 SQL 文件,以便我可以在全新安装中导入它们?
我正在 Windows 11 上使用 XAMPP。
我已经尝试了几十个SO线程,解决方案在那里建议。我找不到适合我的解决方案。
- I tried it with new and old files of ib_logfile0, ib_logfile1 and ibdata1
- I checked the my.ini for innodb_data_file_path = ibdata1:10M:autoextend
- Tried to backup with mysqldump -u root --all-databases > sql_file.sql
Result: mysqldump: Got error: 1932: "Table 'mytablename' doesn't exist in engine" when using LOCK TABLES
- The old pcs xampp version was 8.1.2, my new one 8.1.4 but i also tried to install the old 8.1.2 version resulting in the same Error.
- I'm on Windows, not Ubuntu (Linux)
- I already copied the old files which are mentioned, without success.
- Running the ALTER command in phpmyadmin also results in Error "#1932 - Table XYZ doesn't exist in engine"
- Changing the $i = 0 to $ = 1 in xampp/phpmyadmin/config.inc.php just brought me php errors.
- I have no SQL-Backup to feed, otherwise I would have taken this from the beginning.
- I did not add enum field
- No solution advises here
最好的解决方案是在新的 MySQL 安装中创建一个新数据库,从旧安装中导出所需的所有内容并导入到新安装中。
如果您使用 phpMyAdmin,您可以按照此链接了解如何导出数据https://help.dreamhost.com/hc/en-us/articles/214395738-phpMyAdmin-How-to-backup-or-导出数据库或表。此链接为 import https://help.dreamhost.com/hc/en-us/articles/214395768-phpMyAdmin-How-to-import-a-database-or-table。
背景故事:将文件从旧的 MySQL 安装复制到不同的 MySQL 安装后,我遇到了这个问题。我将
mysql/data/MyDatabaseOld
中的数据库复制到新安装的 MySQL 中。
mysql/data/ibdata1
处有一个名为ibdata1的文件,这是系统表空间。发生此错误的原因是,即使我将 MyDatabaseOld 复制到新安装中,新安装中的 ibdata1 文件也没有此数据库。这就是为什么它说“引擎中不存在”。基本上,ibdata1 文件中不存在该数据库。我不知道是否有办法编辑 ibdata1 文件。您可以尝试将 ibdata1 复制到新安装中,但我不推荐这样做。
我将 Xampp 重新安装到最新版本后遇到了这个问题。 对于我的情况,我用旧的 mysql 文件夹替换了 xampp/mysql 文件夹,它可以工作