You might like to set up your machine with a real looking but fake domain. and set your host name to something otehr than localhost.
Depending on your disrtibution of Linux, the tools might be slightly different. If you have the GUI Desktop installed on your Linux then log in as root and configure a domain and hostname set the hostname from test to whatever you want and set the domain to harald.corp for example and it will configure your networking and mariadb will be much happier
At the end when you check your /etc/hosts file it will have an entry along the lines of
192.168.1.111 test.harald.corp test
If you wish to up your skills you could also run a local DNS service for your machine on your machine
HTH
Cheers
Peter