ScriptsAboutBlogToolsKnowledge BaseReviewsFAQBasketDocsSupport
Databasecrash

Database connection failed (oxmysql)

Also seen as: oxmysql connection refused access denied for user oxmysql pool timeout oxmysql database connection failed FiveM

What causes it

oxmysql couldn't connect to your MySQL/MariaDB database. 'Connection refused' means the database server isn't running or the host/port is wrong. 'Access denied' means bad credentials. 'Pool timeout' means the database is unreachable or overloaded.

How to fix it

Correct your connection string and confirm the database server is running and reachable.

  1. Read the specific oxmysql error — refused, access denied, or timeout each point to a different cause.
  2. Check mysql_connection_string piece by piece: user, password, host, port (default 3306), and database name.
  3. Confirm your MySQL/MariaDB server is actually running.
  4. Confirm the database named in the string exists.
  5. Test the credentials by logging into your database tool (HeidiSQL/phpMyAdmin) with them.
  6. Ensure oxmysql is ensured early in server.cfg.

Related errors

Related guides

Still stuck? We can help.

Optimized, dual-framework scripts for QBCore and ESX from Viper Development — escrow protected, delivered instantly to your Cfx portal.