Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

523
Vistas
PDO connection file wont connect to phpMyAdmin, live site. Keep getting message: SQLSTATE[HY000] [2002] Connection refused

I have a connection file done up with PDO. When I try to connect to my live database, I get an error:

SQLSTATE[HY000] [2002] Connection refused.

I did everything I could think of to try to get this to work. But I keep getting:

SQLSTATE[HY000] [2002] Connection refused.

I am trying to connect to a live database with phpMyAdmin. Here's my code...

<?php
$servername = "10.xxx.x.85:3306";
$username = "nephilim42_341";
$password = "rxxxxxxxxxx3";

try {
$dbh = new PDO("mysql:host=$servername;dbname=wdv341", $username, $password);
    /*** echo a message saying we have connected ***/
    echo 'Connected to database';
    }
catch(PDOException $e)
    {
    echo $e->getMessage();
    }
?>
over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda