[Issue] [FxDk] Connection String Error - vSql / MySql

I get this error every time the server starts.
The error seems to happen only using FxDk

The problem seems to be on FxDk since the server starts normally without it.
vSql works fine if I run the server from start.cmd

I understand the problem is related to my connection string.

sqlbugstring

That line was added to my server.cfg here
sqlbugfiles

But it doesn’t seem to be wrong, I tested other formats referenced here, but no luck.

Can anyone tell me if if this is a known issue, or if there is any known implementation for this?

Ive also checked the following discussions from this forum:
https://forum.cfx.re/t/release-vsql-mysql-async-library/852441
https://forum.cfx.re/t/special-start-order-in-fxdk/4770061

Managed to fix the problem! :blush:
FxDk has a blank.cfg file inside .fxcode folder that runs in development.

sqlbugfix

You need to add your connection string there

sqlbugstringfix

Hope it helps :+1:

This workaround is outdated, nowadays there’s a convar configuration UI, see FxDK → Resources # Convars on the docs.

Add this to e.g. your database resource and then set the value in the Project Settings window.


For example:

  1. I added the following snippet to my vSql/fxmanifest.lua:

    convar_category 'Database' {
       'Connection settings',
       {
           {'MySQL connection string', 'mysql_connection_string', 'CV_STRING', ''},
       }
    }
    
  2. As such, I got the following field showing in my Project Settings window:

  3. After filling out the field, the server correctly has the console variable set:
    image

I can fully agree with @nta, if you didn’t already know and then have to fight with problems because of the start order, use dependencies in the fxmanifests. I had a long discussion with @pink-pepper why i should not edit the internal json files of fxdk to force a different start order. haha

Thank you bro Im still learning this, I was really struggling to migrate my old server into FxDK. Its great to have such an active community :sunglasses: