Skip to content
CyberNex Logo
Back to Tutorials
Troubleshooting3 min readJuly 15, 2026

FiveM error ECONNREFUSED 127.0.0.0:3306

Ganidu Sathishka
Support Engineer at CyberNex | 4+ years customer technical support

Overview

This error means your server tries to reach a database at 127.0.0.1 (localhost) and gets refused. Your game server cannot reach your database through localhost.

Step-by-Step Instructions

<ol><li>Open your server.cfg file.</li><li>Create a database if you have not done so yet (see "How to Create a Database").</li><li>In the mysql_connection_string, replace server= with the IP shown under the Databases tab in your panel.</li><li>Fill in uid=, password= and database= with your database credentials.</li></ol>

Code / Configuration

<pre><code>set mysql_connection_string "server=DB_HOST_IP;uid=DB_USER;password=DB_PASS;database=DB_NAME"</code></pre>

Never use 127.0.0.1

The database IP can never be 127.0.0.1. Always use the host IP from the Databases tab of your panel.

Related Hosting Services
// Frequently Asked Questions

FAQ

Was this guide helpful?

Join our Discord for more guides and direct help from our engineering team.

FiveM error ECONNREFUSED 127.0.0.0:3306 | CyberNex