MySQL file too large import failure Solution Summary

Source: Internet
Author: User
Tags phpmyadmin

When you import a database using phpMyAdmin, you may encounter problems that cannot be imported because the database file is too large!

The English tips are as follows: File exceeds the maximum allowed size

If the host you are using can customize the php.ini, you can directly modify the file to resolve, that is, by editing the php.ini file to re-set the size of the upload file limits, specific steps:

The first step: Open php.ini, find Upload_max_filesize, Memory_limit, post_max_size these three parameters!

The meanings they represent are:

Upload_max_filesize limit the maximum size of uploaded files. Post_max_size sets the maximum size allowed for post data. Memory_limit sets the maximum number of bytes of memory that a script can request.

(In the default case, PHP only allows the maximum upload data is 2M, that is 2048KB, and the limit of the maximum use of memory Memory_limit is only 128m,post maximum also 2M)

The second step: follow the actual performance configuration of the server to make the following modifications:

Upload_max_filesize =8m (upload maximum limit set to 8M, enough general file Web upload) memory_limit =512m (if the server's memory is 2GB, this can be set to 512M) Post_max_size =8m ( Post Data Max is also set to 8MB, this is the same as Upload_max)

Step three: After the modification, restart the system, and then execute the import command, you will be prompted:

Import has been successfully finished,499 queries executed.

(Show successful import, 499 requests processed successfully ...)

But for a classmate who uses a virtual host that does not support custom php.ini, it has to think of another way.

Here is also a method: Split the data file, and then gradually import!

A software is required to split the database file: Sqldumpsplitter

1. Click Brows in the software STEP1 Select the database file you want to split 2. Set the size of the split file at STEP2, kilobytes is the unit of the file size, which can be set to MB3. In STEP3 Select the path of the output. 4. Click the red flag in the SETP4 to execute To begin splitting the file. After the file is split, open the STEP4 set path and you will find a folder named Sqldumpsplitterresult. After opening the folder, you will see the data file that was divided, the file name: The original file name _1.sql, the original file name _2.sql ...... This type of. Finally, there is a file named _datastructure.sql with the original file name! When phpMyAdmin import the file, first import the original file name _datastructure.sql, and then follow the original file name _1.sql, the original file name _2.sql .... In order to import. No, at present, so two methods, according to their actual situation to choose the right Method!

MySQL file too large import failure Solution Summary

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.