0

So I have access inside my virtual machine to run mysql with the following commands: mysql -h (IP for mariadb) -u (user) -p (password) databasename Now, when I try creating the following commands to run mariadb inside of a docker container: [ref] (how to remote access to mariadb on docker?). Then, when I do show tables it says Empty set (0.000 sec). I don't know why I am not able to see the data through docker. I tried using docker ip for the container as well and same thing as well. Does anyone know a way around this? Thank you in advance.

divyashie
  • 9
  • 3

1 Answers1

0

I was able to figure it out. I just had to do something like this - Sometimes, you need to specify the port for the Server or to force TCP mode:

mysql -h 173.18.0.2 -P 3308 --protocol=TCP -u root -p
divyashie
  • 9
  • 3