1, open php.ini. Find Upload_max_filesize, Memory_limit, post_max_size these three parameters!
(In the default case, PHP allows only the largest upload data for 2M, that is, 2048KB, and the limit of the maximum use of memory Memory_limit is only the largest 128m,post also 2M)
MySQL database management (phpmyadmin) Official latest edition
2, according to the actual performance of your server configuration to make the following changes: (Note: The following is a hardware configuration of my server performance changes ...)
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, after the change, I again execute the import command:
Import has been successfully finished, 399 queries.
Displays the import success prompt.
4, 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 very convenient MySQL database management tool, can be used to manage MySQL database, import, export and so on.
But phpMyAdmin has a problem importing MySQL, 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
which
Dbhost
Change to your database server address (TIP: General host default database server address is: localhost)
Dbuser change to your database user name
Password
Change to your database user password
dbname
Change to your database name
Backup.sql represents the file name of the database file that was uploaded to the root directory of the Web site via FTP (the file is uncompressed)