Import large sql databases with phpMyAdmin (increase size limit)

The default import limit in phpMyAdmin is 2MB. In this post I will show how you can overcome this problem and import your large database backup.

Let’s take for example that you have successfully exported a backup of your website database in sql format -the process is described in the post on joomla security patch where you can read the steps to backup your database – having a size of 15MB.

With apache2 and php5 installed you need to make three changes in the file sudo gedit /etc/php5/apache2/php.ini. If you have XAMPPphp.ini file can be found into .\xampp\apache\bin\php.ini. For WAMP into C:\Program Files\PHP5. installed, then probably the

Search first for the entry post_max_size = 2M where you need to enter a larger number than the size of your database (15M in this case) i.e. 25M, then edit the memory_limit and give a larger number than the one given to post_max_size. Finally, edit the entry upload_max_filesize with a value smaller than post_max_size.

Starting from bigger values the order should go like this 1.memory_limit, 2.post_max_size, 3.upload_max_filesize

Restart apache and you are set.

*This post is intended to help users import their databases into local installations. In web hosting things differ from host to host. A good practice is to check your phpMyAdmin limit (my web host limit is 51MB) located in your phpMyAdmin and selecting the tab Import. If your database is larger than the limit of your web host you should message them for arrangements.


Trả lời

Mời bạn điền thông tin vào ô dưới đây hoặc kích vào một biểu tượng để đăng nhập: Logo

Bạn đang bình luận bằng tài khoản Đăng xuất / Thay đổi )

Twitter picture

Bạn đang bình luận bằng tài khoản Twitter Đăng xuất / Thay đổi )

Facebook photo

Bạn đang bình luận bằng tài khoản Facebook Đăng xuất / Thay đổi )

Google+ photo

Bạn đang bình luận bằng tài khoản Google+ Đăng xuất / Thay đổi )

Connecting to %s

%d bloggers like this: