phpMyAdmin Import Export Large database file solution

Source: Internet
Author: User
Tags phpmyadmin

A common approach

phpMyAdmin cannot import large files. At the command line, use the following

The code is as follows Copy Code


Command import: Mysql-u < username >-p< password > < database name > < <sql file name >


Example: mysql-u root-p123456 Box < Box.sql

The above method has to have server permissions or to remotely connect to your MySQL database oh

If you have server privileges to do,

Modify the php.php configuration file!

Modify the following two items

The code is as follows Copy Code
Post_max_size = 8M

The maximum limit for form submissions, which is not to limit the size of an individual file to upload, but to limit the data submitted by the entire form.

The code is as follows Copy Code

Upload_max_filesize = 2M

Maximum limit for uploaded individual files

That's the deal, isn't it?

Below look at the level method solution.

Create a new directory under the phpMyAdmin directory, such as: Mysqldata, edit the config.default.php file phpMyAdmin directory, find $cfg[' Uploaddir ', and write its value as the name of the new directory, as follows:
Code:

The code is as follows Copy Code
$cfg [' uploaddir '] = ' mysqldata '; Directory for uploaded files so can is executed by
phpMyAdmin. For example './upload '. Leave Empty for
No upload directory support. Use%u for username
Inclusion.
$cfg [' savedir '] = '; Directory where phpmyadmin can save exported data on
Server. For example './save '. Leave Empty for no Save
Directory support. Use%u for username inclusion.
$cfg [' docsqldir '] = '; Directory for Docsql Imports, phpMyAdmin can import
Docsql files from this directory. For example
'./docsql '. Leave empty for no docsql import support.
$cfg [' tempdir '] = '; Directory where phpmyadmin can save temporary files.
This is needed for MS Excel export, documentation
How do I enable that.

Upload the file that you want to import into the database to the newly created Mysqldata folder, login to phpMyAdmin,

Select your database and click "Import" in the right window.

At this point you will find that the import interface more than a "Web server upload Directory" option, click the Drop-down arrow,

There will be a list of file names that have just been uploaded. Select the file, click on the lower right corner of the "Execute" button, waiting for a period of time (the waiting time and the volume of the import file in direct proportion) can complete the "overweight" file import.

All right, this is a good way to operate without server permissions.

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.