MySQL Connect failure
#1

Hello.

For some reason my gamemode refuses to connect to MySQL. I have made sure that the server is up and running (ping'ed and tried to connect with php). The mysql is included in the pwn file. libmysql.dll and mysql.dll is placed in the right folders. The DB information match.
Код:
#define SQL_HOST "localhost"
#define SQL_USER "root"
#define SQL_PASS "hidden"
#define SQL_DB "samp"
OnGameModeInit()
Код:
mysql_connect(SQL_HOST, SQL_USER, SQL_PASS, SQL_DB);
Edit:
Here's the error.
Код:
[16:16:46] [MySQL] Error (0): Function: mysql_connect failed, mysql was not initialized on this handle.
Sincerly hanzen
Reply
#2

Are you sura that you have a password in your mysql

i dont have pass for home server
Reply
#3

Yes I'm sure I have a password. I use the same details and connect without any problems using PHP. Also note that I'm using the MySQL Plugin by g-stylaz R5
Reply
#4

mysql_init(); before the connect part.
Reply
#5

Quote:
Originally Posted by Cameltoe
Посмотреть сообщение
mysql_init(); before the connect part.
Yeah I just realized. Thanks, solved now!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)