SA-MP Forums Archive
Strickens mysql_connect - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Strickens mysql_connect (/showthread.php?tid=212150)



Strickens mysql_connect - Sascha - 16.01.2011

Hi, I'm using:
pawn Code:
new MySQL:connection = mysql_init(LOG_ONLY_ERRORS, 1);
    mysql_connect("208.115.247.247", "sgtadmin_hsabot@sgt-site.tk", "password", "sgtadmin_hsaserver", 1, connection);
however I get:
(160) : warning 213: tag mismatch
(160) : warning 213: tag mismatch

(at mysql_connect line)


Re: Strickens mysql_connect - Anthonyx3' - 16.01.2011

An easier way to do it is to define the user, pass, ip, database.

pawn Code:
new MySQL:connection = mysql_init(LOG_ONLY_ERRORS);
    mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_DB, connection, 1);
Then you could define those like this:
pawn Code:
#define MYSQL_HOST  ""
#define MYSQL_USER  ""
#define MYSQL_DB    ""
#define MYSQL_PASS  ""



Re: Strickens mysql_connect - Sascha - 16.01.2011

I know, however that doesn't answer why those warnings show up / how to fix it, as it is exactly how the wiki tut of it says...


Re: Strickens mysql_connect - Typhome - 16.01.2011

mysql_connect("208.115.247.247", "sgtadmin_hsabot@sgt-site.tk", "password", "sgtadmin_hsaserver", 1, connection);

to

mysql_connect("208.115.247.247", "sgtadmin_hsabot@sgt-site.tk", "password", "sgtadmin_hsaserver", connection, 1);


Re: Strickens mysql_connect - Anthonyx3' - 16.01.2011

Quote:
Originally Posted by Sascha
View Post
I know, however that doesn't answer why those warnings show up / how to fix it, as it is exactly how the wiki tut of it says...
You didnt check my code, like above poster said change those 2 around


Re: Strickens mysql_connect - Sascha - 16.01.2011

that's true anthon...
I focused my reading on the #define advice lol -.- sry


Re: Strickens mysql_connect - Sascha - 16.01.2011

but now I have this problem:
Error (0): Failed to connect. Access denied for user 'sgtadmin_hsabot@sgt-site.tk'@'lizard.serverffs.com' (using password: YES).

how to get rid of the @lizard.serverffs.com?


Re: Strickens mysql_connect - Think - 16.01.2011

Quote:
Originally Posted by Sascha
View Post
but now I have this problem:
Error (0): Failed to connect. Access denied for user 'sgtadmin_hsabot@sgt-site.tk'@'lizard.serverffs.com' (using password: YES).

how to get rid of the @lizard.serverffs.com?
its the dns the ip is set to, you cant unless you connect to an other mysql server. so change the ip.