Cannot connect to 10.4.11 from "localhost" (Windows)


I installed MariaDB 10.4.11 on a Windows server.

Everything seems to work fine with my PHP apps but unfortunately I am unable to connect to the DB server via the 'mysql' command or from SQLYog.

E:\MariaDB 10.4\bin>mysql -uuser -ppass ERROR 1042 (HY000): Can't get hostname for your address

E:\MariaDB 10.4\bin>mysql -uuser -ppass Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 63 Server version: 10.4.11-MariaDB binary distribution

I tried it about 20 times and 50% of the time it "Can't get hostname for my address"

When I am able to connect in show processlist it looks like the hostname is:


I am able to connect consistently to the MySQL 5.5 instance that is installed on this machine from both the mysql command line tool as well as SQLYOG

Here is what the server logs when it fails to look up the DNS (for some reason):

Aborted connection 15 to db: 'unconnected' user: 'unauthenticated' host: 'connecting host' (This connection closed normally without authentication

Please advise.

Answer Answered by Ian Gilfillan in this comment.

You can try the skip_name_resolve setting on the server. See also mysql can't get hostname for your address for a discussion on serverfault.


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.