Solution to phpmyadmin database import of KB _ PHP Tutorial

Source: Internet
Author: User
Tags form post
The solution for importing phpmyadmin database to KB is as follows. Solution 1 of phpmyadmin database import of KB. open php. ini. Find the upload_max_filesize, memory_limit, and post_max_size parameters! (By default, php only allows the phpmyadmin database to be imported 2048kb.

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)

Latest official version of MySQL database management (phpMyAdmin)

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

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 command is changed, run the import command again:

Import has been successfully finished, 399 queries executed.

The import success prompt is displayed.

4. 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)

Http://www.bkjia.com/PHPjc/1017842.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/1017842.htmlTechArticlephpmyadmin database import solution 1, open php. ini. Find the upload_max_filesize, memory_limit, and post_max_size parameters! (By default, php only allows...

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.