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.