Solution: the maximum size of MySQL database file imported is 2048KB

Source: Internet
Author: User
Tags server memory

Technical warehouse

Introduction:
Transfer server space for the forum today ~~~ First, use phpmyadmin to export the Mysql database ~~
After creating a database on the new server, import the database! However, the. SQL file of the MySQL database is larger than 2 MB. Therefore, during the import, the system prompts that the error is more than 2048KB and the import is not allowed .... The solution to this article is introduced.

Solution:

1. Open php. ini. Find the upload_max_filesize, memory_limit, and post_max_size parameters!
(By default, php only allows the maximum size of data to be uploaded to 2 MB, that is, 2048KB. The maximum memory usage of memory_limit is only 128 MB, the maximum value of Post is 2 MB)

2. Make the following changes based on the actual performance configuration of your server: (Note: The following changes are made based on the performance and hardware configuration of your server ..)

Upload_max_filesize = 8 M (the maximum upload limit is set to 8 M, which should be enough for normal file WEB uploads)
Memory_limit = 512 M (because the server memory is 2 GB, it cannot be added to M here, huh)
Post_max_size = 8 M (the maximum size of Post data is also set to 8 MB, which is the same as upload_max)

3. After the modification, I restart the system and re-execute the import command:
Import has been successfully finished, 399 queries executed.
(Display how many requests are successfully imported ...)

(Note: After modification, When you import the command line to phpMyadmin, although (sometimes it may still be displayed as: Maximum: 2048KB/Max: 2, 048KiB ); however, you can import a MySQL database up to 8 Mb. the backup file exported by SQL! After modifying php. ini, do not forget to restart the web service or server! After restart, it becomes effective !)

This record is helpful to friends who encounter the same problem ~

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.