thickGlass
thickGlass

Reputation: 580

how to connect to mariadb when both mysql and mariadb exist in the remote server

I'm trying to connect to mariadb in the remote server, I've got both mysql and mariadb installed in the server. Now when I try to connect to mariadb using the following parameters, instead of mariadb I'm connected to mysql. Any suggestion on how to solve this.

mysql -h <host_ip> -uroot -p --socket=user@<host_ip>:/opt/mariadb-data/mariadb.sock

Upvotes: 0

Views: 257

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798576

Use the -P argument to specify the port that the MariaDB server is running on.

mysql ... -P <port> ...

Upvotes: 1

Related Questions