Jump to content
Fórum Script Brasil
  • 0

erro no xamp


smaff

Question

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

  • 0

@ smaff

Este 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 by zebra2011
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...