[英]How to import 5 GB MySQL Dump file in phpmyadmin
我想導入一個大約5 GB的sql文件。 但是它導致加載時出現問題。 有什么方法可以上傳而不拆分sql文件嗎?
我也嘗試過通過終端導入,但是也有很多錯誤。
請幫助我。
很可能您將無法在PHPMyAdmin上導入5GB數據庫。 嘗試BigDump 。 您可以在這里下載。 步驟在下面提到。
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
如果您的apache未啟用最大文件大小5GB,則無法導入這么大的文件。
使用php big dump工具是我見過的最好的工具。 它的自由和開源
http://www.ozerov.de/bigdump/
方法1:-如果您不熟悉命令行,並且確實想堅持使用GUI樣式導入,則可以使用BigDump( http://www.ozerov.de/bigdump/ )。
如果您熟悉命令行並使用基於Linux的系統,則可以使用如下代碼:
mysql -u USERNAME -p DATABASENAME < FILENAME.sql
最后,最痛苦的是,您可以選擇將單個表或表組轉儲到足夠小的轉儲中。 然后通過PHPMYADMIN一次還原這些單個轉儲。
您也可以采用第二種方法:
方法2:-您可以:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.