Articles on: Beginner mistakes

FiveM error ECONNREFUSED 127.0.0.0:3306

If you got this error:


Then you did not setup the mysql_connection_string right. The database IP can never be 127.0.0.1


To fix this:


  1. Open your server.cfg


  1. Create a database if you did not do that yet and save/remember the database details. How to create a database


  1. In the mysql_connection_string, add te following behind this:
  • server= add the IP of your MySQL server (You can find this under the tab databases in you control panel)
  • uid= add the username of your mysql database
  • password= add the password of your mysql database
  • database= add the name of your database


The new mysql_connection_string should be something like this:

set mysql_connection_string "server=151.80.54.190;uid=userhere;password=passwordhere;database=s1_databasename"

Updated on: 03/06/2020

Was this article helpful?

Share your feedback

Cancel

Thank you!