-2
Hello, I’m having difficulties in hosting a php system, initially I developed with xampp (localhost), however, when host is not making the Mysql connection for what I understood..
Error: Exception 'Pdoexception' with message 'SQLSTATE[3D000]: Invalid'
How I’m making the connection:
<?php
try{
$conexao = new PDO('mysql:host=ipdomeuhost;nomebd', nomeuser, senha);
$conexao ->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}catch(PDOException $e){
echo 'ERROR: ' . $e->getMessage();
}
?>
I created the database in the hosting, including the user and password, but I can’t solve this error, someone can help?
Thanks, it worked!
– Igor Castilho