当前位置: 首页 > 知识库问答 >
问题:

MYSQL工作台尝试导入新数据库中现有表的转储文件夹时出错

齐昆
2023-03-14


Operation failed with exitcode 1
14:05:57 Restoring multirenter (product_subtype)
Running: mysql.exe --defaults-file="c:\users\kikit\appdata\local\temp\tmp377gxw.cnf"  --protocol=tcp --host=127.0.0.1 --user=root --port=3306 --default-character-set=utf8 --comments --database=multirenter < "C:\\Users\\kikit\\Documents\\dumps\\Dump20210226\\multirenter_product_subtype.sql"
ERROR 1146 (42S02) at line 22: Table 'multirenter.product_subtype' doesn't exist

Operation failed with exitcode 1
14:05:58 Restoring multirenter (product_type)
Running: mysql.exe --defaults-file="c:\users\kikit\appdata\local\temp\tmph0b0bt.cnf"  --protocol=tcp --host=127.0.0.1 --user=root --port=3306 --default-character-set=utf8 --comments --database=multirenter < "C:\\Users\\kikit\\Documents\\dumps\\Dump20210226\\multirenter_product_type.sql"
ERROR 1146 (42S02) at line 22: Table 'multirenter.product_type' doesn't exist

Operation failed with exitcode 1
14:05:59 Restoring multirenter (rent)
Running: mysql.exe --defaults-file="c:\users\kikit\appdata\local\temp\tmpycsq97.cnf"  --protocol=tcp --host=127.0.0.1 --user=root --port=3306 --default-character-set=utf8 --comments --database=multirenter < "C:\\Users\\kikit\\Documents\\dumps\\Dump20210226\\multirenter_rent.sql"
ERROR 1146 (42S02) at line 22: Table 'multirenter.rent' doesn't exist

Operation failed with exitcode 1
14:06:00 Restoring multirenter (rent_notification)
Running: mysql.exe --defaults-file="c:\users\kikit\appdata\local\temp\tmposezhe.cnf"  --protocol=tcp --host=127.0.0.1 --user=root --port=3306 --default-character-set=utf8 --comments --database=multirenter < "C:\\Users\\kikit\\Documents\\dumps\\Dump20210226\\multirenter_rent_notification.sql"
ERROR 1146 (42S02) at line 22: Table 'multirenter.rent_notification' doesn't exist

Operation failed with exitcode 1
14:06:01 Restoring multirenter (renter)
Running: mysql.exe --defaults-file="c:\users\kikit\appdata\local\temp\tmpi0zamm.cnf"  --protocol=tcp --host=127.0.0.1 --user=root --port=3306 --default-character-set=utf8 --comments --database=multirenter < "C:\\Users\\kikit\\Documents\\dumps\\Dump20210226\\multirenter_renter.sql"
ERROR 1146 (42S02) at line 22: Table 'multirenter.renter' doesn't exist

Operation failed with exitcode 1
14:06:02 Restoring multirenter (renter_role)
Running: mysql.exe --defaults-file="c:\users\kikit\appdata\local\temp\tmpxrcppi.cnf"  --protocol=tcp --host=127.0.0.1 --user=root --port=3306 --default-character-set=utf8 --comments --database=multirenter < "C:\\Users\\kikit\\Documents\\dumps\\Dump20210226\\multirenter_renter_role.sql"
ERROR 1146 (42S02) at line 22: Table 'multirenter.renter_role' doesn't exist

Operation failed with exitcode 1
14:06:03 Restoring multirenter (role)
Running: mysql.exe --defaults-file="c:\users\kikit\appdata\local\temp\tmpa9imev.cnf"  --protocol=tcp --host=127.0.0.1 --user=root --port=3306 --default-character-set=utf8 --comments --database=multirenter < "C:\\Users\\kikit\\Documents\\dumps\\Dump20210226\\multirenter_role.sql"
ERROR 1146 (42S02) at line 22: Table 'multirenter.role' doesn't exist

Operation failed with exitcode 1
14:06:04 Import of C:\Users\kikit\Documents\dumps\Dump20210226 has finished with 13 errors

显然无法识别导入所有表的文件夹。我到了目录,我检查了里面的每一个表,所有的表都包含了相应的数据,例如产品表:

-- MySQL dump 10.13  Distrib 8.0.20, for Win64 (x86_64)
--
-- Host: 127.0.0.1    Database: multirenter
-- ------------------------------------------------------
-- Server version   8.0.20

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Dumping data for table `product`
--

LOCK TABLES `product` WRITE;
/*!40000 ALTER TABLE `product` DISABLE KEYS */;
INSERT INTO `product` VALUES (6,'Roller Blade 1',9,1,1,1,1,1),(9,'Periquito',8,4,2,1,2,2),(10,'chanclas',8,3,2,2,2,3),(11,'product test 1',8,3,2,2,2,3),(12,'product test 2',8,4,2,2,2,2),(13,'Blazer Roller Blades',8,1,1,2,1,1),(14,'Blazer Roller Blades',8,1,1,2,1,1),(15,'Roller Blades Bazer 11',8,1,1,2,1,1),(16,'Surf Board  Hawai 2.0',8,28,4,2,3,3);
/*!40000 ALTER TABLE `product` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2021-02-26 13:36:50

我总是使用MYSQl的Workbench来处理这种导入和导出数据库的情况,如果我不是关系数据库的专家。有人能帮我吗?

共有1个答案

邢令
2023-03-14

您显示给我们的转储不包括表定义,这导致了错误

第22行出现错误1146(42S02):表'multirenter.renter_role'不存在

在运行转储之前重新创建表,或者重新创建包括表定义的转储

 类似资料:
  • 我正在将sql转储文件导入MySQL工作台,并不断收到下面的错误。这是否意味着文件/记录的其余部分没有导入,或者只有xxx.get速率部分没有导入?我会丢失其中的记录吗?有人知道是什么导致了这种情况吗? 01:29:31 恢复 D:\Projects\CustomerName\Customer Files\xxx-2016-Oct-03.sql Running: mysql.exe --defau

  • 我遇到了有关数据库导出的问题。首先,我必须澄清我正在使用MySQL Workbench 5.2.47。到目前为止,我遵循的过程如下: > 我按照http://mysqlworkbench.org/2012/07/migrating-from-ms-sql-server-to-mysql-using-workbench-migration-wizard/的指示创建了与MSSQL DB的连接,以便将其

  • 我正在尝试转储:服务器 21:54:55恢复C:\Users\jonpr\Desktop\loja_cliente.sql 正在运行:" C:\ Program Files \ MySQL \ MySQL work bench 8.0 CE \ MySQL dump . exe "-defaults-file = " C:\ users \ jonpr \ appdata \ local \ te

  • 我正试图从MySQL Workbench导出数据库,但在导出过程中我得到了以下信息: 正在运行:mysqldump.exe-默认值-file = " c:\ users \ user \ appdata \ local \ temp \ tmp 2h 91 wa . CNF "-user = root-host = localhost-protocol = TCP-port = 3306-defa

  • 问题内容: 如何从MySQL导入“ xxxx.sql”转储到PostgreSQL数据库? 问题答案: 不要指望没有编辑就可以工作。也许很多编辑。 mysqldump有一个兼容性参数,其中“名称”可以是“ oracle”或“ postgresql”,但这不能保证兼容性。我认为像ANSI_QUOTES这样的服务器设置也有一定作用。 如果包含用于创建转储的完整命令以及收到的任何错误消息,而不仅仅是说“对

  • 我试图使用Windows上的MySQL Workbench 6.0导出我的数据库,以发送到Amazon RDS中的db实例,但我得到了以下错误: 有人有什么想法可以帮助我吗?