NAT2K15 Development
DiscordStoreConfigGithubStatus Page
  • NAT2K15 Documentation
  • Paid Scripts
    • FiveM Framework
      • 💻Choose your hosting
        • 💻Windows Hosting
          • 🛢️MySQL Installation (xampp)
          • 🛢️MySQL Connection String
          • 👨‍💻Installing Framework
        • 🐧Linux Hosting
          • 🛢️MySQL Installation
          • 🛢️MySQL Connection String
          • 👨‍💻Installing Framework
        • 🎮Panel Hosting
      • 📋Framework Addons
        • FiveM Scoreboard
        • ☎️Framework 911 (paid)
        • 📲NPWD X Framework
          • 📋Editing NPWD Config
          • 🧠Installing npwd-framework
      • ✒️Change Logs
      • ✍️Developers Usage
        • Client Side Exports
        • Server Side Exports
      • ❌Frequent Issues
    • Personal Vehicle V2
      • Discord Bot Token
      • Installing Dependency
      • Editing the Config
    • FiveM Discord Whitelist
      • Discord Bot Token
      • Edit the config
  • FiveM vMenu Modification
  • FiveM Vehicle & Weapon Management System
    • Installing Dependency
    • Configuration Guide
  • FiveM Admin Zone
  • Paid Bots
    • Ticket Bot V2
      • 💻Windows Hosting Guide
        • 🛢️MySQL Installation (xampp)
        • 👨‍💻Installing Node.js
    • Multi Server Control
      • 💻Windows Hosting Guide
        • 👨‍💻Installing Node.js
        • 🚂Starting The Bot
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Paid Scripts
  2. FiveM Framework
  3. Choose your hosting
  4. 💻Windows Hosting

🛢️MySQL Connection String

Creating your database is 1 thing, but connecting your database to your server is another, below are a few steps on how to connect your fivem server to your mysql database.

Previous🛢️MySQL Installation (xampp)Next👨‍💻Installing Framework

Last updated 1 year ago

Was this helpful?


Creating your connection string:

  1. Visit the MySQL String Generator Website:

  2. Click Next twice until you are on 3: Configure the FXServer.

  1. After you are on the 3rd page, scroll down until you see this:

  1. The following information will be required for your connection string to work: (Some other things you can add will be: acquireTimeout and connectTimeout - These will make the string take longer before connecting / pushing an error.)

  • User

  • database

  • host

  • password

  1. After filling out the info regarding your database and you should see a section called FXServer Configuration

  2. Copy the line shown below from the website and paste it into your server.cfg and restart your server

Ensuring oxmysql or mysql-async

  1. Put the following lines of code into your server.cfg below all the default resources required by FiveM.

set mysql_connection_string "host=localhost;user=root;database=fivem"
ensure mysql-async -- Only if using mysql-async
ensure oxmysql -- Only if using oxmysql

Congratulations, you connected your database to your FiveM Server!

Password only required if you created with a password

Whether you use or the way you ensure the it matters.

💻
oxmysql
mysql-async
Here