0

I have a php script which start a simple mysqli connection to a mariaDB database:

$db = @new mysqli( $mysql_host, $mysql_user, $mysql_pw, $mysql_db ); 
if (!$db->connect_error) {
    $db->set_charset("utf8");
} else {
    echo $db->connect_error;
    exit;
}

This works, but sometimes I get the following $db->connect_error:

No such file or directory

One minute later it works again. What does this mean? How can I fix this?

Dharman
  • 26,923
  • 21
  • 73
  • 125
Ghost108
  • 3,818
  • 8
  • 44
  • 89

0 Answers0