question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Import of DB with PHPMyAdmin not working

See original GitHub issue

I opened PHPMyAdmin on localhost:8092. Opened a DB of an environment Removed all tables. Tried to import a DB and PHPMyAdmin gives me only this: Incorrect format parameter I have tried multiple DB backups (sql files), and also compressed (zip files).

[update] It’s probably because of upload limits, so I’ve edited the php.ini file in /usr/local/php with this:

upload_max_filesize = 1000M
post_max_size = 1000M

I see these values in a phpinfo page I created, but PHPMyAdmin still uses 2M as max upload size.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:24 (1 by maintainers)

github_iconTop GitHub Comments

9reactions
niphoenixocommented, Oct 31, 2020

Hi,

I solved import of DB error, by changing UPLOAD_LIMIT=1G at docker-compose.yml

myadmin: image: phpmyadmin/phpmyadmin container_name: phpmyadmin ports: - “8083:80” environment: - UPLOAD_LIMIT=1G - PMA_ARBITRARY=1 - PMA_HOST=${MYSQL_HOST} restart: always depends_on: - mysqldb

3reactions
dustinruecommented, Sep 26, 2019

@mbootsman I looked into this a bit. wp-local-docker-v2 utilizes the phpmyadmin/phpmyadmin image. Turns out the latest image of phpmyadmin/phpmyadmin does NOT configure the max upload size in php at all where, at least some, previous images did.

Here is the new image

[dustin@Dustins-Mac-mini ~]$ docker run --rm -ti 8ad87a8e95c4 bash
root@004f0b216f6c:/var/www/html# cat /usr/local/etc/php/conf.d/phpmyadmin-misc.ini
allow_url_fopen = Off
max_execution_time = 600
memory_limit = 512M

Here is the old image

[dustin@Dustins-Mac-mini ~]$ docker run --rm -ti 626319eaebed bash
root@a496503af277:/var/www/html# cat /usr/local/etc/php/conf.d/php-phpmyadmin.ini
[PHP]
allow_url_fopen = Off
max_execution_time = 600
memory_limit = 512M
open_basedir = /var/www/html:/tmp/:/etc/phpmyadmin/
post_max_size = 512M
upload_max_filesize = 512M

[Session]
session.cookie_httponly = 1
session.hash_function = 1
session.save_path = "/sessions"
session.use_strict_mode = 1

[opcache]
opcache.fast_shutdown = 1
opcache.restrict_api = /disabled/
opcache.save_comments = 0
opcache.use_cwd = 0
opcache.validate_timestamps = 0

For this an issue would need to be raised at https://github.com/phpmyadmin/docker/issues.

However, you have other options. wp-local-docker-v2 does expose mysql on port 3306 so you can use any database management app you might have on your system already. Simply connect to 127.0.0.1 port 3306 and log in as root/password. Your other option to import the database is to put the sql file into the doc root of your project (so wp-local-docker-sites/<project>/wordpress) and use 10updocker wp db import <filename>. This will import the database using wp cli instead of other methods.

Hope that helps

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to import a database through phpMyAdmin
The import is trying to create the database, but you have already created it. In which case it should be dropping the database...
Read more >
How to Import a MySQL Database using phpMyAdmin
Make sure to clear your browser cache and check the list of databases in the MySQL Databases list in cPanel. If the problem...
Read more >
phpMyAdmin — How to import a database or table
Log into phpMyAdmin. · Select the destination database on the left pane. · Click on the Import tab in the top center pane....
Read more >
How do I import a database to phpMyAdmin?
Step 1 - Open your database in phpMyAdmin · Step 2 - Click Databases in the top-menu · Step 3 - Click the...
Read more >
How To Solve Error Importing Database Phpmyadmin Cpanel ...
In this tutorial, I will show you, how to solve error importing database phpmyadmin cpanel or localhost. After this tutorial you can learn, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found