2

I am attempting to connect to a database on a Docker container through MySQL Workbench, though I am unsure what exactly I should be inserting into the following fields:

SSH Hostname (tried localhost:3306 & 8001 and 0.0.0.0:3306 & 8001) SSH Username

MySQL Hostname: left as 127.0.0.1 MySQL Server port: 3306

My DB name, username and password are all "magento".

Guessing it's just the SSH info that is incorrect. Could someone assist here?

Docker PS result

Due to the project I am working on, company and client names have been removed

CONTAINER ID        IMAGE                               COMMAND                  CREATED             STATUS              PORTS                           NAMES
25da671f766d        mageinferno/magento2-nginx:1.11-1   "/usr/local/bin/st..."   5 hours ago         Up 4 hours          443/tcp, 0.0.0.0:8080->80/tcp   CLIENTaws_app_1
f1f7fb0e7174        COMPANY/magento2-php:7.0-fpm       "docker-php-entryp..."   5 hours ago         Up 4 hours          9000/tcp                        CLIENTaws_phpfpm_1
69388c2ce5c7        percona:5.7                         "docker-entrypoint..."   5 hours ago         Up 4 hours          0.0.0.0:8001->3306/tcp          CLIENTaws_db_1
6
  • Cold you show what returns docker ps command? Commented Oct 17, 2017 at 13:25
  • @BukharovSergey Added, though I have had to replace our company and client names. Hope that's enough? Commented Oct 17, 2017 at 13:28
  • thank you, that enough. Your destination port is 8001 . Please try to connect using mysql-client with commnad mysql -umagento -pmagento -P8001 --protocol=tcp Commented Oct 17, 2017 at 13:37
  • @BukharovSergey I am able to connect using that command, though still unsure how to connect using Workbench Commented Oct 17, 2017 at 13:42
  • i understood, But i wanna to check that mysql works properly and can be reached. Workbench settings must be: connection method: Standart (TCP\IP), hostname: 127.0.0.1, port: 8001, username: magento, password: magento. It must works if you can connect to mysql via console mysql client Commented Oct 17, 2017 at 13:48

1 Answer 1

3

You settings must be:

  • connection method: Standart (TCP\IP),
  • hostname: 127.0.0.1,
  • port: 8001,
  • username: magento,
  • password: magento
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.