SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 13/08/2011, 02:43 PM   #1
Urefeu
Big Clucker
 
Join Date: Jul 2011
Posts: 137
Reputation: 0
Default Mysql Plugin

Hello !

I have this code:

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 !
__________________
Urefeu is offline  
Old 13/08/2011, 06:13 PM   #2
Urefeu
Big Clucker
 
Join Date: Jul 2011
Posts: 137
Reputation: 0
Default Re : Mysql Plugin

Erreur
__________________

Last edited by Urefeu; 13/08/2011 at 06:51 PM.
Urefeu is offline  
Old 14/08/2011, 09:21 AM   #3
Urefeu
Big Clucker
 
Join Date: Jul 2011
Posts: 137
Reputation: 0
Default Re : Mysql Plugin

The Debug.txt file :

Code:
[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).
__________________
Urefeu is offline  
Old 14/08/2011, 10:59 AM   #4
Tigerkiller
Gangsta
 
Tigerkiller's Avatar
 
Join Date: May 2010
Posts: 673
Reputation: 25
Default Re: Mysql Plugin

u entred a wrong password, a wrong username or a wrong host
Tigerkiller is offline  
Old 14/08/2011, 01:00 PM   #5
Urefeu
Big Clucker
 
Join Date: Jul 2011
Posts: 137
Reputation: 0
Default Re : Mysql Plugin

Quote:
Originally Posted by Urefeu View Post
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?
__________________
Urefeu is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] [REL] MySQL Plugin (Now on github!) BlueG Plugin Development 6151 03/08/2019 02:48 AM
MySQL Plugin R5 plugin problem dud Scripting Help 12 05/12/2011 07:28 PM
[help][plugin] Can't load mysql plugin mariomako Help Archive 8 16/07/2011 03:37 PM
mysql plugin. loading plugin failed ikkentim Help Archive 2 10/02/2011 03:32 PM


All times are GMT. The time now is 01:12 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.