phpMyAdmin Import data maximum limit of 2048KB solution

Source: Internet
Author: User
Tags form post phpmyadmin

Have server admin rights modify php.ini file


Look for the following three places in the php.ini configuration file:

Upload_max_filesize, Memory_limit and Post_max_size.

Modify the database file whose value is greater than the import (this configuration is complete)


upload_max_filesize = 8M (upload maximum limit set to 8M, this should be enough general file Web upload)
Memory_limit = 512M (because the server's memory is 2GB, so this is added to 512M, AH)
Post_max_size = 8M (post data Max also set to 8MB, this is the same as Upload_max)

3, restart the PHP environment


Phpmyadm Error Tip: You probably tried to upload too file. Please refer to documentation for ways to workaround this limit.

Originally used to import MySQL database with phpMyAdmin, the default MySQL database can only import the maximum 2M, the solution is as follows:

Most of the time is to modify the upload_max_filesize in the php.ini under the PHP5 folder, but after modifying this, it prompts the question;

Then change the following:

Modify PHP.ini

File_uploads on whether to allow the switch to upload files over HTTP. The default is on, which is open

upload_tmp_dir– files are uploaded to the server where temporary files are stored, and the system default temporary folder is used if unspecified

Upload_max_filesize 20m business, that is, allow the maximum size of uploaded files. The default is 2M

Post_max_size 30m refers to the maximum value that can be received by a form post to PHP, including all the values in the form. The default is 8M

Description

Generally, set the above four parameters, in the normal network situation, upload 8M large volume files, only set up the above four items can also be able to do. Unless your network really has 100m/s upload high-speed, otherwise you have to continue to set the following parameters, that is, set its time,

Max_execution_time 300 maximum time (in seconds) for each PHP page to run, default 30 seconds

Max_input_time 300 The maximum time required for each PHP page to receive data, default 60 seconds

Memory_limit 80m each PHP page to eat the maximum memory, the default 8M, if your machine memory is large enough, you can set up a bit larger

Sets the maximum size allowed for POST data. This setting also affects file uploads. 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 uploads. Generally speaking, memory_limit should be larger than post_max_size.

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

phpMyAdmin is a convenient MySQL database management tool that can be used to manage MySQL databases, import, export, etc.
But phpMyAdmin has a problem importing MySQL, and if the database file you want to import is large, the import will fail. Here is a simple and effective way to import any size of the MySQL database, theoretically, no matter how large your database backup files can be imported. The
method is as follows:
1. Upload database backup files (such as Backup.sql) to the site root directory.
2. Save the following code as a mysql.php file and upload it to the site root directory.
System (MySQL
-hdbhost-udbuser-ppassword dbname
where
Dbhost
is changed to your database server address (tip: The default database server address for a generic host is: localhost)
Dbuser change to your database user name
Password
Change to your database user password
dbname
to your database name
Backup.sql represents the file name of the database file that is uploaded to the root of the Web site via FTP (the file is uncompressed)

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.