[HELP]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: [HELP]MySql Connect (
/showthread.php?tid=338163)
[HELP]MySql Connect -
Dusan01 - 29.04.2012
Hy guys i usning MySql connection on my server.But i have problem!Cant connect on MySql here is code.THANKS
Код:
>> mysql_connect( )
CMySQLHandler::CMySQLHandler() - constructor called.
CMySQLHandler::CMySQLHandler() - Connecting to "localhost" | DB: "balkanen_pawno" | Username: "balkanen_energy" ...
CMySQLHandler::Connect() - Can't connect to MySQL server on 'localhost' (10061) (Error ID: 2003)
Re: [HELP]MySql Connect -
warcodes_ - 29.04.2012
Show me your MYSQL connect stock.
Re: [HELP]MySql Connect -
Dusan01 - 29.04.2012
??i dont understand u
Re: [HELP]MySql Connect -
Niko_boy - 29.04.2012
Do your MySQL host has a password i mean the databse ? check it
and show us Line:
mysql_connect (
EDIT: do u really have mysql i.e. wamp or xampp server installed ? for mysql and php stuff ?
Re: [HELP]MySql Connect -
Dusan01 - 29.04.2012
i dont have xampp and wamp
but can u check is this ok?
Код:
if(mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_DB, MYSQL_PASS)) print("BattleAC | Spajanje sa MySQL bazom je uspesno!");
else print("BattleAC | Spajanje sa MySQL bazom nije uspelo...");
Код:
#define MYSQL_HOST "176.9.72.45"
#define MYSQL_USER "bcpanhos_bcrpgg"
#define MYSQL_DB "bcpanhos_bcrpg"
#define MYSQL_PASS "bc123321"
Re: [HELP]MySql Connect -
Niko_boy - 29.04.2012
lol u need one of them xamp and wamp to install mysql on your localhost
and btw the one you showing now #define MYSQL_HOST "176.9.72.45"
it connect to a remote mysql right ? is that your website or something from wher eu get HOST , USER , DB and PASS info?
Re: [HELP]MySql Connect -
Dusan01 - 29.04.2012
ok i downloading xampp and oops thi is my mistake #define MYSQL_HOST "176.9.72.45" need to be #define MYSQL_HOST "localhost"
Re: [HELP]MySql Connect -
Niko_boy - 29.04.2012

okay then
https://sampforum.blast.hk/showthread.php?tid=290257 or
https://sampwiki.blast.hk/wiki/Mysql_tutorial
this tutorial go through it and try to understand how to connect to a localhost mysql
Re: [HELP]MySql Connect -
Dusan01 - 29.04.2012
i used this tut:
https://sampwiki.blast.hk/wiki/Mysql_tutorial but in this step its says This is not a number! why? pls help
Re: [HELP]MySql Connect -
AaronKillz - 01.12.2012
Quote:
Originally Posted by Dusan01
|
You must specify the CHAR lengths.