FPtje / DarkRP

DarkRP, a non-serious roleplay gamemode for Garry's Mod.
https://darkrp.miraheze.org
MIT License
462 stars 707 forks source link

Cannot connect to remote MySQL database #1880

Closed HybridFox closed 9 years ago

HybridFox commented 9 years ago

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

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

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

MStruntze commented 9 years ago

And you're sure that your MySQL permissions are set up to allow non-localhost connections?

HybridFox commented 9 years ago

Like i said, other addons can connect succesfully (more precisly UGB) as you can see here http://prntscr.com/6pzyw5

FPtje commented 9 years ago

Not a help forum

HybridFox commented 9 years ago

I am not asking for help, i am pretty sure this is a bug since the script isnt using the IP i gave.

MStruntze commented 9 years ago

It wouldn't return Access denied if it tried to connect to %.

HybridFox commented 9 years ago

I'm 100% sure i'm using the correct data. And it wouldnt make sense to use % instead of the actual IP since when i use 127.0.0.1 it returns that.

FPtje commented 9 years ago

DarkRP can't throw that error unless the MySQL library says the password is wrong.

HybridFox commented 9 years ago

I Agree, But why does it say "%" instead of my IP i gave?

FPtje commented 9 years ago

Ask the maintainer or MySQLOO. MySQLite is just passing on the error.

HybridFox commented 9 years ago

Anyway, i'm using a local MySQL Database now and that seems to be working