Strickens mysql_connect
#1

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)
Reply
#2

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  ""
Reply
#3

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...
Reply
#4

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);
Reply
#5

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
Reply
#6

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

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?
Reply
#8

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)