So I'm setting up an installer for my web app, and have input fields for database credentials. Part of my validation process includes testing the database connection (using PHP's PDO library). If the connection fails, I want to be able to differentiate between a bad password, bad address, nonexistent database name, etc. so I can reference the proper input field on the form.
Can anone point me towards a reference that outlines the possible error codes/messages that are returned with a PDOException?
Edit: It occurred to me that these error codes/messages are probably database-specific and the native database codes/errors may simply be getting passed through. If this is the case, I am currently only working with MySQL 5 databases.