I have a WordPress production website.
I\'ve exported the database by the following commands: select database > export > custom > select all tables &g
For me, adjusting the 2 values was not enough. If the file is too big, you also need to adjust the execution time variables.
First, ../php/php.ini
upload_max_filesize=128M
post_max_size=128M
max_execution_time=1000
Then, ../phpMyAdmin\libraries\config.default.php
$cfg['ExecTimeLimit'] = 1000;
This did the trick for me. The variables can be choosen differently of course. Maybe the execution time has to be even higher. And the size depends on your filesize.
Without any problems, I imported directly from the command line.
mysql -uroot -hURLServer -p DBName< filename.sql
Note: If you're using MAMP you MUST edit the file using the built-in editor.
Select PHP in the languages section (LH Menu Column) Next, in the main panel next to the default version drop-down click the small arrow pointing to the right. This will launch the php.ini
file using the MAMP text editor. Any changes you make to this file will persist after you restart the servers.
Editing the file through Application->MAMP->bin->php->{choosen the version}->php.ini
would not work. Since the application overwrites any changes you make.
Needless to say: "Here be dragons!" so please cut and paste a copy of the original and store it somewhere safe in case of disaster.
None of the above answers solved it for me.
I cant even find the 'libraries' folder in my xampp - ubuntu also.
So, I simply restarted using the following commands:
sudo service apache2 restart
and
sudo service mysql restart
Just restarted apache and mysql. Logged in phpmyadmin again and it worked as usual.
Thanks me..!!
None of these answers worked for me. I had to use the command line:
mysql -u root db_name < db_dump.sql
SET NAMES 'utf8';
SOURCE db_dump.sql;
Done!
I had this problem but with a docker container (phpmyadmin users),
Solution:
docker exec -it idcontainer /bin/bash
cd /usr/local/etc/php/
php.ini
fileupload_max_filesize=128M
post_max_size=128M
max_execution_time=1000
This problem was in a Windows pc, at Linux i didnt need to do this.