Hi Guys,
I have a 2 errors with PDO:
Sometimes give me this error:
Connection error, because: SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 111
Other time sent me this:
SQLSTATE[42000] [1203] User [MYUSERNAME] already has more than 'max_user_connections' active connections
This is my connect to database script:
try{
$db = new PDO("mysql:host=mysqlwebhost;dbname=databsename",$dbuser,$dbpass);
}
catch(PDOException $e){
die('Connection error, because: ' .$e->getMessage());
}
Where can I read more about errors and how to defeat them?