SA-MP Forums Archive
Strickenkid's 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)
+--- Thread: Strickenkid's mysql_connect() (/showthread.php?tid=378063)



Strickenkid's mysql_connect() - ViPGuy - 16.09.2012

Hello guys .. so i have a problem .. as the title says its about Strickenkid's mysql_connect()


Here's the code:



Up top:
Code:
#define MYSQL_HOST 		  "localhost"
#define MYSQL_USER        "root"
#define MYSQL_PASS        ""
#define MYSQL_DB          "roleplay"
under Gamemodeinit:

Code:
Handle = mysql_init(1);
	mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS , MYSQL_DB , Handle , 1);
And here's the error .. :

Code:
Error (0): Failed to connect. Access denied for user 'root'@'localhost' (using password: YES).
It says that im using a password although i ain't using one ...

I tried switching the password and the database .. didnt help me ..


Thank you in advance!


AW: Strickenkid's mysql_connect() - BiosMarcel - 16.09.2012

I think you used a wrong Password or a wrong Username

(I don't know many about MySQL)


Re: Strickenkid's mysql_connect() - ViPGuy - 16.09.2012

But the problem is that i dont use a password .. and its says that im using one :S


AW: Strickenkid's mysql_connect() - BiosMarcel - 16.09.2012

Use Password 123 or something like this and try it again

Or undefine the password if you don't use a password


Re: Strickenkid's mysql_connect() - ThomasCarter - 16.09.2012

Define the Password bud, In the "Put your password here". If you could'nt Figure that out you shouldnt
be using mysql


Re: Strickenkid's mysql_connect() - ViPGuy - 16.09.2012

Dafuq ? Please talk english.


Re: Strickenkid's mysql_connect() - ViPGuy - 16.09.2012

Never Mind i got it..