[HELP]MySql Connect
#1

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

Show me your MYSQL connect stock.
Reply
#3

??i dont understand u
Reply
#4

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

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

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

ok i downloading xampp and oops thi is my mistake #define MYSQL_HOST "176.9.72.45" need to be #define MYSQL_HOST "localhost"
Reply
#8

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

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

Quote:
Originally Posted by Dusan01
Посмотреть сообщение
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
You must specify the CHAR lengths.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)