Mysql error.
#1

Hello. I have problem with mysql connect,when i start server mysql don't load here:

Код:
[17:05:27] >> mysql_connect( )

[17:05:27] CMySQLHandler::CMySQLHandler() - constructor called.

[17:05:27] CMySQLHandler::CMySQLHandler() - Connecting to "127.0.0.1" | DB: "database" | Username: "root" ...

[17:05:28] CMySQLHandler::Connect() - Can't connect to MySQL server on '127.0.0.1' (10061) (Error ID: 2003)
Here is my codes:

Код:
#define MySQL_HOST "127.0.0.1"
#define MySQL_USER "root"
#define MySQL_DATA "database"
#define MySQL_PASS ""
OnGameModeInit

Код:
mysql_debug( true );
mysql_connect( MySQL_HOST,MySQL_USER,MySQL_DATA,MySQL_PASS );
if( mysql_ping( ) >= 1 )
{
print( "Prisijungeme prie MySQL sekmingai!" );
}
else
{
SendRconCommand( "exit" );
}
Mysql is on,and i use XAMPP program for on. I try go to 127.0.0.1/phymyadmin and all works fine.

Then where is bad?
Reply
#2

Quote:

The error (2003) Can't connect to MySQL server on 'server' (10061) indicates that the network connection has been refused. You should check that there is a MySQL server running, that it has network connections enabled, and that the network port you specified is the one configured on the server.

http://dev.mysql.com/doc/refman/5.1/...to-server.html
Reply
#3

pawn Код:
mysql_connect(MySQL_HOST, MySQL_USER, MySQL_DATA, MySQL_PASS);
if(mysql_ping() == 1) {
    mysql_debug(1);
} else {
    SendRconCommand( "exit" );
}
Reply
#4

don't work..
Reply
#5

Do you even have a database running on your computer?
Reply
#6

Do this:

1. Download this -> CLICK ME!
2. Install WAMP.
3. Start WAMP.
4. In your FS change this:
pawn Код:
#define MySQL_HOST "localhost"
#define MySQL_USER "root"
#define MySQL_DATA "database"
#define MySQL_PASS ""
5. Create new database at "phpmyadmin"
6 And voila - you are done!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)