How to upload / import a mysql phpmydadmin database of more than 2MB
2014-08-21 15:50
423 查看
There is a couple of ways.1) Split your SQL file into multiple 2MB chunks
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)(要修改好几个地方哦)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 = 1000M3) If you do have root run a command line
mysql -u database_name -p -D database_name < file
max_input_time此变量可以以秒为单位对通过POST、GET以及PUT方式接收数据时间进行限制。如果应用程序所运行环境处在低速链路上,则需要增加此值以适应接收数据所需的更多时间。max_input_time = 90max_execution_time变量max_execution_time设置了在强制终止脚本前PHP等待脚本执行完毕的时间,此时间以秒计算。当脚本进入了一个无限循环状态 时此变量非常有用。然而,当存在一个需要很长时间完成的合法活动时(例如上传大型文件),这项功能也会导致操作失败。在这样的情况下必须考虑将此变量值增 加,以避免PHP在脚本正在执行某些重要过程的时候将脚本关闭。max_execution_time = 90[/code]
相关文章推荐
- My First Test of Php Linking to MySql
- How do i prevent end users from connecting to the database other than my application?", version 8.1.5
- How to limit an array of similar hashes to those that have more than one of the same key:value pair
- How to get a job paying more than $100,000 a year
- How do I upload or download XML to/from a database
- Please pay more attention to the character set of your database
- HowTo Restore RMAN Disk backups of RAC Database to Single Instance On Another Node [ID 415579.1]
- HowTo Restore RMAN Disk backups of RAC Database to Single Instance On Another Node
- How to migrate MsSql database to MySql
- Tips: How to resolve the issue of MySQL about abnormal login after system launched.
- PHP Tutorials : Add, View, Edit & Delete from to MySQL database, Live Example (News System)
- how to install apache, PHP and MySQL on Linux 2
- how to install apache, PHP and MySQL on Linux 3
- how to accepte the array of the checkbox in asp and in php
- Please pay more attention to the character set of your database
- how to get the space size of some tables in one database?
- how to get the space size of some tables in one database?
- Learning PHP & MySQL: Step-by-Step Guide to Creating Database-Driven Web Sites [ILLUSTRATED]
- How to Do Everything with PHP and MySQL
- how to install apache, PHP and MySQL on Linux