I can't connect to mysql database...
#1

I've just learnt portforwarding and I'm success, my server is online now (non mysql).
So I tried somebody's gamemode Base Roleplay Script (LS-RP replica) and using mysql, but when I tried to connect my server to the database, it's failed but the server still online, so if tried to In Game, it'd be only stuck in the Login System (because the server can't connect to the database), I'm using xampp to controlling the database, I don't know why I can't connect into the database.

But, when I change the HOST to 'localhost', the server can connect to the database and all is okay FOR ME, then I tell my friend to connect to my server, but he was same with me before, only stuck in the Login System.

With this code, my server can connect to the database, I can login and play into the server, but my friend can't connect and stuck in the Login System.
Код:
#define SQL_HOSTNAME "localhost"
#define SQL_USERNAME "root"
#define SQL_DATABASE "sampdatabase"
#define SQL_PASSWORD "root"
With this code, the hostname is my whatsmyipadress' ip, the ip of my server when it's online but the server can't connect to the database, it's only shown online.
Код:
#define SQL_HOSTNAME "18x.xxx.xx.xxx"
#define SQL_USERNAME "root"
#define SQL_DATABASE "sampdatabase"
#define SQL_PASSWORD "root"

PS: If you don't get me, tell me which part you didn't get it, for me it's hard to explain anything in English.
Reply


Messages In This Thread
I can't connect to mysql database... - by Hreesang - 17.07.2018, 03:52
Re: I can't connect to mysql database... - by denNorske - 17.07.2018, 05:27
Re: I can't connect to mysql database... - by Hreesang - 17.07.2018, 05:58

Forum Jump:


Users browsing this thread: 2 Guest(s)