简体   繁体   中英

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

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM