Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/04/2021, 10:44
Avatar de hernansam
hernansam
 
Fecha de Ingreso: septiembre-2007
Ubicación: Funes , Argentina
Mensajes: 204
Antigüedad: 16 años, 7 meses
Puntos: 0
Problema conexion mysql php

Hola, tengo un problema al querer conectar a una bd mysql local, tengo toda las credenciales bien, pero me salta el siguiente error

Error: :( SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: No address associated with hostname

Código PHP:

<?php
if (!isset($_SESSION)) {
  
session_start();
}

# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_super "locahost";
$database_super "atsa";
$username_super "root";
$password_super "atsaatsa";
/*$super = mysql_pconnect($hostname_super, $username_super, $password_super) or trigger_error(mysql_error(),E_USER_ERROR);
include("includes/funciones.php");*/

$super mysqli_connect($hostname_super$username_super$password_super$database_super);

if (!
$super) {
    echo 
"Error: No se pudo conectar a MySQL." PHP_EOL;
    echo 
"errno de depuración: " mysqli_connect_errno() . PHP_EOL;
    echo 
"error de depuración: " mysqli_connect_error() . PHP_EOL;
    exit;
}
//include("includes/funciones.php");

?>