Mysql Tools 5.0 – Eternal Night https://www.shuijingwanwq.com There is no problem not worth solving, and no technology not worth learning! Sun, 07 Jun 2026 13:37:53 +0000 en-US hourly 1 https://wordpress.org/?v=7.0 Importing oversized SQL files in MySQL Query Brower https://www.shuijingwanwq.com/en/2017/09/14/16117/ https://www.shuijingwanwq.com/en/2017/09/14/16117/#respond Thu, 14 Sep 2017 02:38:37 +0000 https://www.shuijingwanwq.com/?p=16117 浏览量: 1

1. Since too large SQL files cannot be imported in phpmyadmin, I decided to import them in mysql query browser, as shown in Figure 1

由于在 phpMyAdmin 中无法导入过大的 SQL 文件,因此决定在 MySQL Query Brower 中导入

Figure 1

2. The SQL file size is: 186MB, as shown in Figure 2

SQL 文件大小为:186MB

Figure 2

3. Click the Execute button to execute the script, as shown in Figure 3

点击 Execute 按钮,执行脚本

Figure 3

4. During the execution process, the Execute button is gray, cannot be clicked again, and there is an execution progress prompt, as shown in Figure 4

在执行过程中,Execute 按钮为灰色,无法再次点击,且有执行进度提示

Figure 4

5. Execute error: You have an error in your SQL syntax, as shown in Figure 55. You have an error in your SQL syntax, as shown in Figure 5

Script line: 182467 you have an error in your SQL syntax; Server version for the right syntax to use near<p style=\”padding:0px;line-height:26px;color:#333333;font-family:&#39;open sanat line 1

执行报错:You have an error in your SQL syntax

Figure 5

6. The reason is: there is an error in the sql file itself, the import is not complete, a total of 334242 lines, there is an error in the 182467 line, the import is cutoff, as shown in Figure 6

原因在于:SQL文件本身存在错误,未导入完全,总计 334242 行,在182467行存在错误,导入截止

Figure 6

7. Delete line 182467, as shown in Figure 7

删除第 182467 行

Figure 7

8. Analyze line 182467, it can be found that the import cutoff is caused by the S� keyword. You can search for the lines containing s. After all are deleted, continue to import until all the SQL files are imported, as shown in Figure 8

分析第 182467 行,可以发现是因为 S� 关键字导致导入截止,可以搜索包含 S� 的行,全部删除之后,继续导入,直至 SQL 文件全部导入完毕

8

9. A total of 334084 lines, all imported, as shown in Figure 9

总计 334084 行,全部导入完毕

Figure 9

10. Click the Execute button again to execute the script, and the execution is successful, as shown in Figure 10

再次点击 Execute 按钮,执行脚本,执行成功

Figure 10

11. This scheme still has drawbacks. First, the operation steps are too cumbersome, and the other is that some special characters are not friendly enough. Finally, I decided to use the sql command to import the sql file and start the MySQL client, as shown in Figure 11

使用SQL命令来导入SQL文件,启动 MySQL 客户端

Figure 11

12. Execute the following commands in sequence, as shown in Figure 12
show databases;
use kaiqiu;
show tables;
source c:/users/administrator/downloads/gdm.sql;

依次执行如下命令

Figure 12

13. The SQL file size is: 303MB, as shown in Figure 13

SQL 文件大小为:303MB

Figure 13

14. View in phpMyAdmin, the import is successful, as shown in Figure 14

在 phpMyAdmin 中查看,导入成功

Figure 14

]]>
https://www.shuijingwanwq.com/en/2017/09/14/16117/feed/ 0