Strange connectivity behavior

You are viewing an old version of this question. View the current version here.

Hello,

  • I am running a Mariadb server (community editing) (M) in a docker container on a separate Linux server (X).
  • I can successfully connect to this Mariadb server in the following scenarios:
    1. Using Beekeeper Studio (community edition) from my macOS laptop (L).
    2. Using the mariadb python connector in a python script running on an Ubuntu development machine (D).

However I cannot connect to M using the mariadb cli client installed on D.

  1. I run the mariadb cli client on D as:
    • mariadb -h <hostname for X> -p <remapped container port for M on X) -u <user name with *.* access>
  2. I then get the prompt:
    • Enter password:

However after entering my password I always get a failure with the error message:

  • ERROR 2002 (HY000): Can't connect to server on 'X' (115)*

I have tried connecting to X using its name as well as IP address, with the same results. Based on the first two successful scenarios, I am sure this is not a network connectivity issue or a name resolution issue.

Is there some way to debug the client?

Many thanks!

Answer

My error: port needs to be specified with an uppercase p, i.e. -P

mariadb -h <hostname for X> -P <remapped container port for M on X) -u <user name with *.* access>

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.