NSanjay
NSanjay

Reputation: 211

phpmyadmin host not found !

Hi im using xampp & I am trying to connect using php.

<?php $server = localhost; $username = root; $password = ******;?>

$sql_connections = mysql_connect("$server, $username, $password") or die(mysql_error());

Warning: mysql_connect() [function.mysql-connect]: php_network_getaddresses: getaddrinfo failed: Host desconocido. in C:\xampp\htdocs\Database Manager\admin\sql_functions.php on line 17

Warning: mysql_connect() [function.mysql-connect]: [2002] php_network_getaddresses: getaddrinfo failed: Host desconocido. (trying to connect via tcp://localhost, root, usd27498:3306) in C:\xampp\htdocs\Database Manager\admin\sql_functions.php on line 17

Upvotes: 0

Views: 3915

Answers (2)

Pekka
Pekka

Reputation: 449385

You are using incorrect notation to set the server:

 mysql_connect("$server, $username, $password")

needs to be

 mysql_connect($server, $username, $password)

manual on mysql_connect

Upvotes: 3

Luixv
Luixv

Reputation: 8710

did you start your xampp control panel?

is your apache running? try http://localhost

is your mysql running?

try http://localhost/phpmyadmin/

depending the error you are getting is what you have to do. I am guessing that you might have a problem with the mysql password.

Upvotes: 0

Related Questions