我想将客户收到的文件导入测试数据库。
我遇到了很多错误,所以我决定使用与客户相同的系统和数据库版本。
但是我仍然遇到同样的问题...
第一个SQL部分来自我遇到问题的importfile:
--
-- Dumping data for table `bm_adressen`
--
LOCK TABLES `bm_adressen` WRITE;
/*!40000 ALTER TABLE `bm_adressen` DISABLE KEYS */;
INSERT INTO `bm_adressen` VALUES (xxxxx);
INSERT INTO `bm_adressen` VALUES (xxx);
INSERT INTO `bm_adressen` VALUES (xxx);
/*!40000 ALTER TABLE `bm_adressen` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_general_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/
/*!50017 DEFINER=`xadminer`@`localhost`*/
/*!50003 TRIGGER `bm_adressen_bi` BEFORE INSERT ON `bm_adressen` FOR EACH ROW
最后一行会产生问题。
有什么想法吗?
问候,罗伯特
答案 0 :(得分:0)
mysql> SHOW GLOBAL VARIABLES LIKE '%version%';
+-------------------------+-------------------------+
| Variable_name | Value |
+-------------------------+-------------------------+
| innodb_version | 5.7.25 |
| protocol_version | 10 |
| slave_type_conversions | |
| tls_version | TLSv1,TLSv1.1 |
| version | 5.7.25-0ubuntu0.18.10.2 |
| version_comment | (Ubuntu) |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
+-------------------------+-------------------------+
8 rows in set (0.01 sec)
mysql> STATUS;
--------------
mysql Ver 14.14 Distrib 5.7.25, for Linux (x86_64) using EditLine wrapper
Connection id: 19
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.7.25-0ubuntu0.18.10.2 (Ubuntu)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /var/run/mysqld/mysqld.sock
Uptime: 15 hours 20 min 31 sec
Threads: 1 Questions: 116 Slow queries: 0 Opens: 118 Flush tables: 1 Open tables: 108 Queries per second avg: 0.002
--------------
当我导入.sql文件时,出现该错误: 第166行的错误1064(42000):您的SQL语法有错误;查看与您的MySQL服务器版本相对应的手册以获取正确的语法,以在第1行的'* /'附近使用