Docker Community Forums

Share and learn in the Docker community.

Problem with phpmyadmin and tutum/mysql container


(Hellb0y77) #1

Hi, i installed with success the tutum/mysql container but with phpmyadmin i have this error:

2003 Cannot log in to the MySQL server

From console i enter with:

mysql -u admin -p -h 127.0.0.1 (work perfectly)

someone uses tutum / mysql with phphmyadmin?


(Sven Dowideit) #2

Which image are you using for phpmyadmin?


(Sven Dowideit) #3

Ok, I’ve reproduced a setup that works for me:

bash-3.2$ docker run -d -p 3306:3306 tutum/mysql

2ea6d94467899643c017ef814b44e5ac9baef4584f06f447b6482fd1e11a3e18

bash-3.2$ docker logs 2ea6d94467899643c017ef814b44e5ac9baef4584f06f447b6482fd1e11a3e18

=> An empty or uninitialized MySQL volume is detected in /var/lib/mysql

=> Installing MySQL ...

=> Done!

=> Waiting for confirmation of MySQL service startup

=> Creating MySQL user admin with random password

=> Done!

========================================================================

You can now connect to this MySQL Server using:



    mysql -uadmin -pTR6bHQMNnxTs -h<host> -P<port>



Please remember to change the above password as soon as possible!

MySQL user 'root' has no password but only allows local connections

========================================================================

140904 01:08:32 mysqld_safe Can't log to error log and syslog at the same time.  Remove all --log-error configuration options for --syslog to take effect.

140904 01:08:32 mysqld_safe Logging to '/var/log/mysql/error.log'.

140904 01:08:32 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql



bash-3.2$ docker run -it --rm tutum/mysql bash

root@0e02cfb71716:/# mysql -uadmin -pTR6bHQMNnxTs -h192.168.59.103

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 1

Server version: 5.5.38-0ubuntu0.14.04.1 (Ubuntu)



Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.



Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.



Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.



mysql> quit

Bye

root@0e02cfb71716:/# exit



Cbash-3.2$ docker run --rm -it --link=dreamy_brown:mysql -e MYSQL_USERNAME=admin -e MYSQL_PASSWORD=TR6bHQMNnxTs --name phpmyadmin -p 80:80 corbinu/docker-phpmyadmin

Warning: Using a password on the command line interface can be insecure.

Warning: Using a password on the command line interface can be insecure.

ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'pma'@'%'

The phpmyadmin container is not using the localhost port mapped to your host, its using a private docker --link.

Does that help?


(Hellb0y77) #4

thanks, i’m not using phpmyadmin in a container but i extract phpmyadmin tar.gz in apache container directory. I’m resolved calling private ip and works