SA-MP Forums Archive
[MYSQL]Connect bug or...? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [MYSQL]Connect bug or...? (/showthread.php?tid=172475)



[MYSQL]Connect bug or...? - [SF]Bamdude37 - 30.08.2010

Hi,

I am trying to make a MySQL account system, and I have this code in the game mode under OnGameModeInit:

mysql_connect("184.154.42.106", "sfa1_admin", "sfa1_server", "password");

Everything loads up fine, but when I register nothing happens, I looked into this problem and found that it is trying to connect to my ip instead of the 184.154.42.106

Error Message:

[06:51:03] -- Connecting to "184.154.42.106" | DB: "sfa1_server" | Username: "sfa1_ServU" ...
[06:51:04] CMySQLHandler::Connect() - Access denied for user 'sfa1_ServU'@'72.25.63.125' (using password: YES) (Error ID: 1045)

Is this a common bug, or is this an error on my part?


Re: [MYSQL]Connect bug or...? - Calgon - 30.08.2010

Have you confirmed that the connection details are correct? If so, does your MySQL server allow remote connections (if you are connecting to another server through the plugin)?


Re: [MYSQL]Connect bug or...? - [SF]Bamdude37 - 30.08.2010

The connection details are correct (at least I think so, its the ip of the PHPmyAdmin) and I am not sure if it allows remote connections, the most I have ever done on there all used Localhost, how would I find out?


Re: [MYSQL]Connect bug or...? - Calgon - 30.08.2010

Quote:
Originally Posted by [SF]Bamdude37
Посмотреть сообщение
The connection details are correct (at least I think so, its the ip of the PHPmyAdmin) and I am not sure if it allows remote connections, the most I have ever done on there all used Localhost, how would I find out?
Try this: http://www.cyberciti.biz/tips/how-do...se-server.html (if you have root access to the server)


Re: [MYSQL]Connect bug or...? - [SF]Bamdude37 - 30.08.2010

I found an area in CPannel called Remote MySQL, if this is it, I added my IP to the list of access hosts. It still gives the same error as before


Re: [MYSQL]Connect bug or...? - [SF]Bamdude37 - 30.08.2010

Has anyone else tried using mysql_connect with another host that can see something wrong with what i did?


Re: [MYSQL]Connect bug or...? - Scenario - 30.08.2010

If your running your server on your localhost, why don't you download and install "XAMPP". You can basically host a website, or MySQL server, from your personal PC. It's a lot easier to maintain and you won't have to worry about incompatibility. If you need a small tutorial on installation and setup, I'm sure if you ****** and/or ******* searched it, something will pop up.


Re: [MYSQL]Connect bug or...? - [SF]Bamdude37 - 30.08.2010

Im not running it on local host, im running it off a dedi, and i want the account system to be on x10hosting


Re: [MYSQL]Connect bug or...? - Scenario - 30.08.2010

Quote:
Originally Posted by [SF]Bamdude37
Посмотреть сообщение
Im not running it on local host, im running it off a dedi, and i want the account system to be on x10hosting
Okay, well that can't happen. If you have a dedicated server, install MySQL! You cannot use x10Hosting or even 000WebHost for a SA-MP MySQL database, it just isn't allowed... Find another option.


Re: [MYSQL]Connect bug or...? - [SF]Bamdude37 - 30.08.2010

Well by dedi i mean just hosted , on http://no1servers.com/ but why can't you use x10 premium