Solution for phpmyadmin to import data up to KB

Source: Internet
Author: User
Tags form post
I think many of my friends will encounter the prompt Youprobablytriedtouploadtoolargefile. Pleaserefertodocumentationforwaystoworkaroundthislimit when using phpmyadmin to import data. The solution is summarized below.

I think many of my friends will see You probably tried to upload too large file when using phpmyadmin to import data. please refer to documentation for ways to workaround this limit. I have summarized the solutions for these prompts.

You have the Server Management permission to modify the php. ini file.


Find the following three items in the php. ini configuration file:

Upload_max_filesize, memory_limit, and post_max_size

Modify the value to be greater than the imported database file (this configuration is complete)


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. Restart the php Environment


Phpmyadm error message: You probably tried to upload too large file. Please refer to documentation for ways to workaround this limit.

When I used phpmyadmin to import a mysql database, the default mysql database can only be imported at most 2 MB. The solution is as follows:

In most cases, the upload_max_filesize in php. ini under the PHP5 folder is modified. However, this problem is still prompted after the php. ini file is modified;

The changes are as follows:

Modify PHP. ini

Whether file_uploads on allows file upload over HTTP. ON is enabled by default.

Upload_tmp_dir-upload the file to the place where the temporary file is stored on the server. If this parameter is not specified, the default Temporary Folder will be used.

Upload_max_filesize 20 m wangwen business, that is, the maximum file size allowed to be uploaded. The default value is 2 MB.

Post_max_size 30 m Refers to the maximum value that can be received by the form POST to PHP, including all values in the form. The default value is 8 Mb.

Description

Generally, after the above four parameters are set, when the network is normal, uploading a large size file of 8 MB can only set the above four items. Unless your network has a high upload speed of 100 Mb/s, you have to set the following parameters, that is, set the time,

Max_execution_time 300 maximum time (in seconds) for running each PHP page. The default value is 30 seconds.

Max_input_time 300 maximum time required for receiving data on each PHP page. The default value is 60 seconds.

Memory_limit 80 m maximum memory that is consumed by each PHP page. The default value is 8 M. If your memory is large enough, you can set a larger value.

Set the maximum size allowed for POST data. This setting also affects file upload. To upload a large file, the value must be greater than upload_max_filesize.

If the memory limit is activated in the configuration script, memory_limit also affects file upload. Generally, memory_limit should be larger than post_max_size.

If you do not have the permission to modify it, we can try

Phpmyadmin is a convenient mysql database management tool that can be used to manage, import, and export mysql databases.
However, phpmyadmin has a problem when importing mysql. If the database file to be imported is large, the import will fail. Next we will teach you a simple and effective way to import mysql Databases of any size. Theoretically, no matter how large your database backup files are, you can import them.
The method is as follows:
1. Upload the database backup files (such as backup. SQL) to the root directory of the website.
2. Save the following code as a mysql. php file and upload it to the root directory of the website.
System ("mysql
-Hdbhost-udbuser-ppassword dbname
Where
Dbhost
Change to the address of your database server (Note: The default address of the database server on the host is localhost)
Change dbuser to your database username
Password
Change to Your Database User Password
Dbname
Change to your database name
Backup. SQL indicates the file name of the database file uploaded to the root directory of the website through ftp (this file is the decompressed file)

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.