DarkRP Cannot connect to a Remote MySQL DB

When i try to use a remote MySQL database for my DarkRP i get a weird error,
somehow when i input an IP and not the standard 127.0.0.1 i get this weird error

[lua]gamemodes/darkrp/gamemode/libraries/mysqlite/mysqlite.lua:333: Connection failed! Access denied for user ‘xxxxxxxxxxxx_felix’@’%’ to database ‘xxxxxxxxxxxx_darkrp’[/lua]

Somehow my IP becomes a %.
This is my mysql.lua from DarkModification http://pastebin.com/pXqfC3yW

MySQL OO is setup correctly since other addons can connect to the DB

Now, why am i posting this here? well basicly the creater of DarkRP thinks this is not a bug, honestly i posted it on the DarkRP github and the only thing he said was “not a helpforum” (https://github.com/FPtje/DarkRP/issues/1880)
But hey, no wonder the worst gamemode has the worst creater (he doesnt code bad, but still…)

P.S. Sorry if this is posted in the wrong category.

Correct me if I’m wrong, but I was under the impression that sqlite uses garrysmod’s sv.db and not an actual MySQL database

You can set it to use a MySQL Database as seen here
[lua]RP_MySQLConfig.EnableMySQL = true[/lua]

This isn’t a bug in DarkRP. Either you have put the wrong details into the config file, or your MySQL server isn’t allowing the server to connect with those details from that IP address. “%” is used in MySQL to mean ALL. This pretty much means your server is not allowing external connections from that user. (I think) If your MySQL server is on the same machine as your Gmod server, try using ‘localhost’ or ‘127.0.0.1’ to connect to the MySQL server, since that is an internal connection instead of external, like you are trying here. If your server is not allowing external connections for that user, but allows internal connections, that would work.

I’m 100% sure everything is set up correctly, other addons can connect succesfully to the same database with the same user (http://prntscr.com/6pzyw5)

Check your MySQL details. If they are exactly the same, you wouldn’t have any issues. They all use the same module to connect so they should be, functionally, the same.

I agree, but they dont use all the same lua to connect to the DB, if u look at the file where the error is taking place, it’s a rather complex piece of code.

This is an SQL error, not a Lua error. It’s nothing to do with how the gamemode is connecting (unless the gamemode is changing any of your info).

Double check that the config for UDB is exactly the same as the config for DarkRP. Does UDB also use the xxxxxxxxx_darkrp database?

Different Lua code to connect to the DB won’t cause MySQL errors. The error tells you what the problem is. The user is not allowed to connect to the DB. This means either your details are incorrect or your MySQL user isn’t set up properly. You seem to be connecting to an external server, so I suggest you ensure your MySQL user is allowed to be used from an external IP.

I just double checked and yes, they are using the same database. Anyway if i use a local database it works, i’ll just stay with a local DB