Php error: no such host is known

Hello. I`ve created a database and I tried to register an user in it and I have this error:
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: No such host is known.

Also it told me to check out this lines of code:

public function query($sql){
$this->stmt = $this->handler->prepare($sql);
}

are you using localhost as the host?

How do I check that?

Look in you database connection string

Sponsor our Newsletter | Privacy Policy | Terms of Service