gpt4 book ai didi

php - 如何在 phpmyadmin 中导入 5 GB 的 MySQL 转储文件

转载 作者:行者123 更新时间:2023-11-29 01:39:18 25 4
gpt4 key购买 nike

我想导入一个大约 5 GB 的 sql 文件。但它在加载时引起问题。有什么办法可以在不拆分sql文件的情况下上传吗?

我也尝试过通过终端导入,但也有很多错误。

请帮我解决这个问题。

最佳答案

您很可能无法在 PHPMyAdmin 上导入 5GB 的数据库。尝试 BigDump .可以下载here .步骤如下。

Download and unzip bigdump.zip on your PC.

Open bigdump.php in a text editor, adjust the database configuration and dump file encoding.

Drop the old tables on the target database if your dump doesn’t contain “DROP TABLE” (use phpMyAdmin).

Create the working directory (e.g. dump) on your web server

Upload bigdump.php and the dump files (*.sql or *.gz) via FTP to the working directory (take care of TEXT mode upload for bigdump.php and dump.sql but BINARY mode for dump.gz if uploading from MS Windows).

Run the bigdump.php from your web browser via URL like http://www.yourdomain.com/dump/bigdump.php.

Now you can select the file to be imported from the listing of your working directory. Click “Start import” to start.

BigDump will start every next import session automatically if JavaScript is enabled in your browser.

Relax and wait for the script to finish. Do NOT close the browser window!
IMPORTANT: Remove bigdump.php and your dump files from your web server.

否则试试命令行

mysql -u user_name -p database_name < path/to/the/file.sql

关于php - 如何在 phpmyadmin 中导入 5 GB 的 MySQL 转储文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30256044/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com