smaff Posted November 22, 2011 Report Share Posted November 22, 2011 como concerta essi erro Warning: mysqli_connect() [function.mysqli-connect]: (HY000/2003): Can't connect to MySQL server on '192.168.1.3' (10061) in C:\xampp\htdocs\sp00\Main Access Panel\mod_dbase.php on line 6Connect failed : 0<?phprequire_once 'config.php';function db_open(){$dbase = mysqli_connect('192.168.1.3', "root", "protecao", "root");if (mysqli_connect_errno()) {printf ("<font class='error'>Connect failed</font> : %d\n", mysqli_connect_error());return null;}return $dbase;}function db_open_byname($dbname){$dbase = mysqli_connect ('192.168.1.3', "root", "protecao", $dbnome);if (mysqli_connect_errno()) {printf ("<font class='error'>Connect failed</font> : %d\n", mysqli_connect_error());return null;}return $dbase;}function db_close($dbase) {mysqli_close($dbase);}?> Quote Link to comment Share on other sites More sharing options...
0 ESerra Posted November 22, 2011 Report Share Posted November 22, 2011 É só ler a mensagem de erro... Quote Link to comment Share on other sites More sharing options...
0 zebra2011 Posted November 22, 2011 Report Share Posted November 22, 2011 (edited) @ smaffEste erro é porque o XAMPP não está conseguindo conectar ao MYSQL pelo IP 192.168.1.3 (normalmente o IP local de sua máquina), ele pede para vocês abrir o arquivo C:\xampp\htdocs\sp00\Main Access Panel\mod_dbase.php na linha 6 para corrigir o problema.Normalmente o IP local das máquinas são 192.168.1.1 ou 192.168.1.2, verifique a configuração de sua máquina, e tente localizar alinha 6 do arquivo,e altere o IP com o padrão de sua máquina.Abraços! Edited November 22, 2011 by zebra2011 Quote Link to comment Share on other sites More sharing options...
Question
smaff
como concerta essi erro
Warning: mysqli_connect() [function.mysqli-connect]: (HY000/2003): Can't connect to MySQL server on '192.168.1.3' (10061) in C:\xampp\htdocs\sp00\Main Access Panel\mod_dbase.php on line 6
Connect failed : 0
<?php
require_once 'config.php';
function db_open(){
$dbase = mysqli_connect('192.168.1.3', "root", "protecao", "root");
if (mysqli_connect_errno()) {
printf ("<font class='error'>Connect failed</font> : %d\n", mysqli_connect_error());
return null;
}
return $dbase;
}
function db_open_byname($dbname){
$dbase = mysqli_connect ('192.168.1.3', "root", "protecao", $dbnome);
if (mysqli_connect_errno()) {
printf ("<font class='error'>Connect failed</font> : %d\n", mysqli_connect_error());
return null;
}
return $dbase;
}
function db_close($dbase) {
mysqli_close($dbase);
}
?>
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.