Could not connect to your database server (during installation)
Question:
Could not connect to your database server (during installation)
Answer:
This error may be taken at face value -- iPanel/iHost is unable to connect to your database server.
There are a number of potential causes for this error. Please refer to the following checklist when attempting to diagnose this issue:
- Verify that you're not mistyping your database name, database username, or database password
- If using CPanel, ensure that you've not only created your database and database user, but that you've also assigned the user to the database (which is a separate step).
- If using CPanel, ensure that you're using the username_ prefix on your database table name.
- Ensure that your database user has the CREATE TABLE privileges.
- Check that your MySQL server is actually running.
- If your MySQL server is on a different server machine than your web server, ensure that the web server machine has been granted permission to access your database account on the MySQL server.
If all else fails, you may wish to try connecting to your database manually from a shell prompt (eg: mysql -uMYSQLUSER -pMYSQLPASS -hMYSQLHOST MYSQLDATABASE) and make sure that the connection is successful. If so, then the issue is likely with PHP itself (and/or its MySQL extension).