# FiveM Database Connection Failed – Fix MySQL & oxmysql

FiveM "Database connection failed" or oxmysql error? MySQL/MariaDB connection, connection string, ESX/QBCore – database troubleshooting for RP servers.

**Quick answer:** "Database connection failed" = **wrong MySQL connection string** or DB unreachable. Check `mysql://user:pass@127.0.0.1:3306/dbname`, start oxmysql, import ESX/QBCore SQL.

**If you landed here:** FXServer starts but ESX/QBCore/oxmysql throws DB errors, players can't spawn or inventory empty.

## Related

- [Connect database](/en/gameserver/fivem/setup-basics/connect-database)
- [ESX vs QBCore](/en/gameserver/fivem/which-framework)
- [FiveM won't start](/en/gameserver/fivem/server-startet-nicht)
*Products & ordering: [Order game server](https://nexorahost.com/category/gameserver-1) · Manage: [panel.nexorahost.de](https://panel.nexorahost.de) · [My account](https://nexorahost.com/account) · [nexorahost.com](https://nexorahost.com) (Frankfurt · 1 Tbit/s DDoS · 99.9% uptime)*
