本文介紹一下如何修改導入數據庫時候的大小限制,筆者在用PHPmyadmin導入mysql數據庫時,遇到15M的數據庫不能導入,MySQL數據庫最大只能導入2M..
PHPmyadmin數據庫導入出錯:
You probably trIEd to upload too large file. Please refer to documentation for ways to workaround this limit.
可以修改導入數據庫文件最大限制嗎?可以!
解決這個問題,可以參考phpmyadmin文檔;直接點擊這個鏈接,PHPmyadmin自動查找到了以下說明:
The first things to check (or ask your host provider to check) are the values of upload_max_filesize, memory_limit and post_max_size in the PHP.ini configuration file. All of these three settings limit the maximum size of data that can be submitted and handled by PHP. One user also said that post_max_size and memory_limit need to be larger than upload_max_filesize.
以上文件大致說明的意思就是說,遇到導入過大文件時,首先檢查PHP.ini 配置文件中的以下三個地方,upload_max_filesize, memory_limit 和post_max_size,並且推薦修改的值要稍大於導入的巨大sql數據庫文件;依照這個提示,修改了以上三個在php.ini中的值以後,重啟了PHP環境,再次導入時,數據庫文件已經被成功的導入了。