SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known

前端 未结 16 776
说谎
说谎 2021-01-03 17:56

I download from https://github.com/luciddreamz/laravel Laravel for openshift then upload over my repository over github. This code for connect to database not work. The prob

16条回答
  •  既然无缘
    2021-01-03 18:23

    Just as on FYI to others suddenly experiencing this on an otherwise (previously) working Laravel installation:

    My Laravel environment is on a Ubuntu VirtualBox hosted on a Win-10 laptop.

    I used my phone to share Internet via USB and suddenly started experiencing this issue. I changed to using the phone as wireless hotspot and the issue went away. This is a nameserver/networking issue and is not specific to Laravel or MySQL.

提交回复
热议问题