Powered By Blogger

Friday, May 23, 2014

Import Large File of Mysql in phpMyAdmin

Tips to solve importing mysql large file over 50 mb in phpmyadmin
If you have large file or any database in raw sql data you can upload it in phpmyadmin
However, this will not going to be as easy as you imagine as there will be limitation to the data for just 50mb or any amount that can be uploaded through phpmyadmin

mysql upload large file
“You probably tried to upload too large file. Please refer to documentation for ways to workaround this limit.”
If you meet such warning above during the upload process, you can try to overcome it through the following procedures
How to import extra big files with phpMyAdmin in either linux or windows server
a. Find the config.inc.php file located in the phpmyadmin directory.
WINDOWS WAMP: C:\wamp\apps\phpmyadmin3.2.0.1\config.inc.php
UBUNTU: /etc/phpmyadmin/config.inc.php
b. Find the line with $cfg['UploadDir'] on it and update it to:
WINDOWS WAMP: $cfg['UploadDir'] = ‘upload’;
UBUNTU: $cfg['UploadDir'] = ‘/etc/phpmyadmin/upload’;
c. Create a directory called ‘upload’ within the phpmyadmin directory.
WINDOWS: C:\wamp\apps\phpmyadmin3.2.0.1\upload\
UBUNTU: /etc/phpmyadmin/upload
Then place the large sql file that you are trying to import into the new upload directory.
When going onto the db import page within phpmyadmin console, you will see a drop down present that was not there before in that it contains all of the sql files in the upload directory that you have just created.
Furthermore, you can now select this and start the import.
If anything happens during the upload process, you can try to fix any issue with these solutions
1. Try to refresh the import page
in xampp, config.inc.php do not content the line,
$cfg['UploadDir'] = ‘upload’;
Just open the config.inc.php using wordpad
If you do not find the line just type it
$cfg['UploadDir'] = ‘upload’;
before ?>
Make sure to change the variable $cfg['ExecTimeLimit'] from 300 to 0 in config.default.php file in case of xampp
Afterward simply save and restart the service.
And try to change both *”post_max_size”* and *”upload_max_filesize”* in your “php.ini” that is located where your “php.exe” is.
The following example allows you to upload and import 128MB sql files:
post_max_size=128M
upload_max_filesize=128M
Restart Apache to get all set.
If any issue arises you can continue to the following way
migrate wp sql data phpmyadmin
2. Try to use ems sql manager for mysql.
Before use that you have to change your max_upload_size and than import your sql query or file.
Try increasing max_allowed_packet to 2M in my.ini or any other amount you need related to the sql file that you want to be uploaded through phpmyadmin
3. If you meet the warning “The directory you set for upload work cannot be reach” in xampp, you can do these tricks
All you have to do is to restart the service, and make sure you have files in the upload folder, or the drop down probably wont show.
By doing so you will get what you want as it has worked in XAMPP.

No comments:

Post a Comment