FS#62696 - mariadb client always use the local unix domain socket if you enter -h localhost

Attached to Project: Arch Linux
Opened by Sebi (s2020) - Tuesday, 21 May 2019, 22:46 GMT
Last edited by Christian Hesse (eworm) - Saturday, 14 September 2019, 19:58 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
mariadb-clients does not respect the "-h"-Flag if you specify "localhost". It always tries to connect through the local Database-Socket which is not always existend, because you want to connect to a remote database.

Additional info:
mariadb-clients

Steps to reproduce:
Just tenter:
mysql -h localhost [-p]

Output: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock'

Not everyone uses a unix domain socket to run a mariadb server. For example if you have a mariadb server inside a docker container.
This task depends upon

Closed by  Christian Hesse (eworm)
Saturday, 14 September 2019, 19:58 GMT
Reason for closing:  Not a bug
Additional comments about closing:  expected
Comment by Christian Hesse (eworm) - Saturday, 14 September 2019, 19:58 GMT
That's expected behavior. Use loopback address 127.0.0.1 to connect via network stack.

Loading...