MySQL 如何上传/导入2MB以上的mysql phpmydadmin数据库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8366271/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to upload / import a mysql phpmydadmin database of more than 2MB
提问by Ghostman
With the default settings, phpmyadmin
does not allow me to upload a database of more than 2mb
. How to upload or import
in a mysql phpmydadmin
database of more than 2MB
?
使用默认设置,phpmyadmin
不允许我上传超过2mb
. 如何upload or import
在一个mysql phpmydadmin
数据库中超过2MB
?
回答by James Williams
There is a couple of ways.
有几种方法。
1) Split your SQL file into multiple 2MB chunks
1) 将您的 SQL 文件拆分为多个 2MB 的块
OR
或者
2) update your php.ini file with the following (only works on dedicated/local servers - any server you have root on or ones that allow php.ini to be override)
2)使用以下内容更新您的 php.ini 文件(仅适用于专用/本地服务器 - 您拥有 root 的任何服务器或允许覆盖 php.ini 的服务器)
Find:
post_max_size = 8M
upload_max_filesize = 2M
max_execution_time = 30
max_input_time = 60
memory_limit = 8M
Change to: ( or any size you want but it will depend on your server resources )
post_max_size = 35M
upload_max_filesize = 35M
max_execution_time = 5000
max_input_time = 5000
memory_limit = 1000M
3) If you do have root run a command line
3) 如果你有 root 运行命令行
mysql -u username -p -D database_name < file
回答by Trott
The 2 Mb limit on file uploads is a default setting in PHP so you'll need to increase it in your php.ini
file. http://www.php.net/manual/en/features.file-upload.common-pitfalls.phpNote that more than one setting may need to be increased.
文件上传的 2 Mb 限制是 PHP 中的默认设置,因此您需要在php.ini
文件中增加它。 http://www.php.net/manual/en/features.file-upload.common-pitfalls.php请注意,可能需要增加多个设置。
回答by Tudor Constantin
Archive that dump in a .tar.gz
file and upload that file
将转储存档在.tar.gz
文件中并上传该文件
回答by user916315
Try http://www.ozerov.de/bigdump/.
试试http://www.ozerov.de/bigdump/。
This splits the dump files into small chunks and uploads them automatically.
这会将转储文件分成小块并自动上传。