Short answer
Your site’s configuration file has the wrong database name, username, password or host. Check all four against what DirectAdmin shows, remembering the account prefix on the database name, and use
localhost as the host.Learn more
- Database connection failedFix ‘Access denied for user’, ‘Unknown database’ and connection errors in PHP apps by checking prefixes, passwords, privileges and host.
- “Error establishing a database connection” in WordPressFix WordPress’s database connection error: check wp-config.php credentials, database user permissions, the database host and damaged tables.
- Connecting a PHP application to your databaseThe connection details for Traxio databases and working examples with PDO and mysqli, including safe queries and keeping credentials private.
Looking for somewhere to run PHP and MySQL? Traxio’s free PHP MySQL hosting includes phpMyAdmin and is free for your first 30 days.