Home >Backend Development >PHP Tutorial >Share the method to solve the limitation of importing large files above 2M in PhpMyAdmin_PHP Tutorial
To deal with this problem, after some research, we found that there are 2 methods:
Method 1:
Find php.ini and search these 3 places upload_max_filesize, memory_limit and post_max_size
Just modify the values behind them to be larger than the database size you need to import.
Then restart the PHP environment.
Method 2: Take phpMyAdmin-3.1.0-all-languages as an example, my installation directory E: wwwrootphpMyAdmin
1. Create a new directory upload.
in the phpmyadmin directory2. Open phpmyadmin, find the E:wwwrootphpMyAdminconfig.sample.inc.php file, find and modify it to $cfg['UploadDir'] = “upload”; and then click Save.
Open the E:wwwrootphpMyAdminlibrariesconfig.default.php file, find and modify it to $cfg['UploadDir'] = “upload”; and then click Save.
3. Use FTP to upload the sql file that needs to be imported to phpmyadmin/upload/
4. Visit phpmyadmin, click Import, and a drop-down box for selecting files on the server will appear. Select the SQL file just uploaded using FTP. So far the perfect solution.
Finally open http://www.xx.com/phpmyadmin/ and log in, click import to see it.