I can't connect to mysql5 in PHP5

265 views Asked by At

I use this code:

<?php
    $link = mysql_connect('nibiru.zarea.net/sqladmin', 'czoctopus','*******');
    if (!$link) {
        die('<h1>Mysql error: ' . mysql_error() . '</h1>');
    }
?>

this is echo:

Mysql error: php_network_getaddresses: getaddrinfo failed: Name or service not known

1

There are 1 answers

1
Pekka On BEST ANSWER

This

 example.com/sqladmin

is not a valid server address. You probably need to use the domain only (or ask your provider for the address of the database server).