The MySQL server is a completely separate piece of software from the
web server; therefore, we must consider the possibility that the server
may be unavailable or inaccessible due to a network outage, or because the
username/password combination you provided is rejected by the server, or
because you just forgot to start your MySQL server! In such cases,
new PDO won’t run, and throw a PHP exception.
Share this highlighthttp://www.safaribooksonline.com/a/php-mysql/3562/