Mysql Plugin
#1

Hello !

I have this code:

Код:
forward ConnectMysql();
public ConnectMysql()
{
	mysql_connect("my_host", "my_username", "my_dbname", "my_password");

    if(mysql_ping() == 1)
    {
    	mysql_debug(1);
	    printf("[MYSQL] : Connexion sucessfull !");
	}
	else
	{
	    printf("[MYSQL][ERROR] : ERROR !");
	}
	return 1;
}
I use ConnectMysql(); In the OnGameModeInit.

I have the mysql plugin, the bookseller a_mysql.inc and Mysql, and I have no error in the code.

I checked the login in PHP and they are correct.

When I launch my. Exe, I have the error message ...

Can you help me please ?

Thanks !
Reply
#2

Erreur
Reply
#3

The Debug.txt file :

Код:
[17:59:36] ---------------------------

[17:59:36] MySQL Debugging activated (08/13/11)

[17:59:36] ---------------------------

[17:59:36]  

[17:59:36] >> mysql_connect( )

[17:59:36] CMySQLHandler::CMySQLHandler() - constructor called.

[17:59:36] CMySQLHandler::CMySQLHandler() - Connecting to "sql11.redheberg.com" | DB: "gacqnnpj_sab" | Username: "gacqnnpj_urefeu" ...

[17:59:37] CMySQLHandler::Connect() - Access denied for user 'gacqnnpj_urefeu'@'ip-62-129-161-135.evhr.net' (using password: YES) (Error ID: 1045)

[17:59:37] >> mysql_ping( Connection handle: 1 )

[17:59:37] CMySQLHandler::Ping() - You cannot call this function now. (Reason: Dead Connection)
However, I checked via a PHP script, the identifiers are correct (the PHP script has connected to the DB with them).

Should be on the same FTP?

The script logs on from FTP given to me by redheberg (the host in question).

I have over a user 'gacqnnpj_urefeu' on which I put all rights on the management of the database 'gacqnnpj_sab'.

I have for this user the password I enter when I try to log on script SAMP.

The host indicates the host is: sql11.redheberg.com.

The server where I try to connect to is at OVH (I also tried locally).
Reply
#4

u entred a wrong password, a wrong username or a wrong host
Reply
#5

Quote:
Originally Posted by Urefeu
Посмотреть сообщение
I checked the login in PHP and they are correct.
Then I think it's because I try to access an external FTP Redheberg since ...

Would you know a free service that accepts external connections?

Otherwise, my server is hosted by OVH. If I buy a web hosting OVH, they would be on two FTP dispute, but both OVH. Would it be possible to access the web hosting (mysql) for server hosting?

Otherwise, I talk to people using MySql, how do you do?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)