ubuntuusers.de

Zugriff auf Datenbank in einer VM

Status: Ungelöst | Ubuntu-Version: Ubuntu 18.04 (Bionic Beaver)
Antworten |

rammi22

Anmeldungsdatum:
5. Juli 2012

Beiträge: 277

Wohnort: Berlin

Hallo,

ich habe mir für eine Shopware 6 - applikation eine Entwicklungsumgebung in einer VM mit der Vagrant Box von Shopware eingerichtet. Mit vagrant ssh kann ich auf die VM via ssh zugreifen. Und mit folgenden Befehl auf die Mysql-Datenbank:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
vagrant@dev:~$ sudo mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7499
Server version: 5.7.30-0ubuntu0.18.04.1 (Ubuntu)

Copyright (c) 2000, 2020, 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> SELECT table_name FROM information_schema.tables;
+------------------------------------------------------+
| table_name                                           |
+------------------------------------------------------+
| CHARACTER_SETS                                       |
| COLLATIONS                                           |
...

Jetzt will ich vom Host (WIN 10) auf die Guest VM (Ubuntu 18.04) via MysqlWorbench zugreifen. Der Versuch erzeugt einen Fehler:

Failed to Connect to MySQL at localhost:3306 through SSH tunnel vagrant@192.168.33.10:22 with user vagrant

Access denied for user 'vagrant'@'localhost' (using password: NO)

Laut Fehlermeldung spricht MySQlWorkbench mit dem richtigen Server, aber vagrant als user ist wohl der Falsche. Aber einen weiteren user kenne ich nicht. Und auf der command line setze ich sudo. Wie muss ich das auf der Anmeldung von Workbench abbilden?

TomLu

Anmeldungsdatum:
23. August 2014

Beiträge: 603

$ cat /etc/ssh/sshd_config

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes

Wobei ich den Password-Zugang allerdings nicht erlauben würde, sondern nur via Pubkey-Auth...

rammi22

(Themenstarter)

Anmeldungsdatum:
5. Juli 2012

Beiträge: 277

Wohnort: Berlin

TomLu schrieb:

... $ cat /etc/ssh/sshd_config

# To disable tunneled clear text passwords, change to no here! PasswordAuthentication yes

Ok, so geht es erstmal, Danke

Antworten |