I'm trying to create a connection string in dreamweaver with MySQL. It is my first tutorial with php and MySQL so excuse me if I'm missing something. This is my connectionString code:
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_explorecalifornia= "mysql:host=localhost;
dbname=explorecalifornia;charset=utf8";
$database_explorecalifornia = "explorecalifornia";
$username_explorecalifornia = "root";
$password_explorecalifornia = "";
$explorecalifornia = mysql_pconnect($hostname_explorecalifornia,
$username_explorecalifornia, $password_explorecalifornia) or trigger_error
(mysql_error(),E_USER_ERROR);
?>
I'm getting this error :
Deprecated: mysql_pconnect(): The mysql extension is deprecated and will
be removed in the future: use mysqli or PDO instead in
C:\wamp\www\dwwithphp\Connections\explorecalifornia.php on line 9
I tried using mysql_connect(),mysqli() and PDO() but I also have an error:
Warning: mysqli::mysqli(): php_network_getaddresses: getaddrinfo
failed: No such host is known. in
C:\wamp\www\dwwithphp\Connections\explorecalifornia.php on line 9
similar error for the other methods. the last two days I've been searching for a solution with no luck. I'M using :Apache/2.4.9 (Win64) PHP/5.5.12,MySQL 5.6.17 and Dreamweaver cs5
Edit
I tried uninstalling wamp server and reinstalling it but it didn't work
I've got the same errors. I don't know what to do next, i really need help.