Getting connection failed: php_network_getaddresses: getaddrinfo failed: Name or service not known

霸气de小男生 提交于 2019-11-29 13:54:00
Ivan Bošnjaković

Thanks Prerak,

This is the answer, my database is on the same machine so I just needed to edit:

$servername = "localhost"

Now everything is working just fine.

The value you've specified for $servername is not a host name but rather a URL, or resource name. The host name would be just www.url.com.

Of course, as you've already discovered, localhost is the correct host name if the client and server reside on the same box.

pavan

Make changes in bellow file config-db.php

nano  /etc/phpmyadmin/config-db.php 

change db server as localhost

$dbserver='localhost';

Its works for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!