A
A
Alexander Ampleev2019-10-03 17:13:43
MySQL
Alexander Ampleev, 2019-10-03 17:13:43

How to connect to a database on a virtual machine using MySql Workbench?

1. I set the SSH HOST NAME to the same one with which I connect via the terminal with the ssh [email protected] command - the ssh connection works
2. I set the ssh user name the same with which I connect via the terminal with the ssh [email protected] command - the ssh connection works
3. I enter the password through the Store in keychain button, the same one that I use when connecting ssh
4. Hostname I write the result of the netstat -tln "127.0.0.1" command
5. The port is similar to "3306"
6. The password is the same as in the file on the virtual machine .my .cnf
5d960101f3452817273657.png
But the connection fails... What am I doing wrong?
UPD:
Sergey , "that is, are you connecting via ssh to the virtual machine on 127.0.0.1?
Or what?" no, the one shown by the ip addr show command on the virtual machine. In my case 172.20.10.11
5d9732c2c9dd9372819037.png
show the virtual network settings.
5d97325cb3596312544450.png- is that what you mean?
"PS: ssh key file is not a password! it's a key file for access by key." - when I click "store in keychain", it prompts me to enter a password:
5d9733007e9e3361155234.png
As a result, it looks like this
5d97336bb749e515776977.png
When test connection gives an error
5d9733910c5a3226360746.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question