[MYSQL]Connect bug or...?
#1

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

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

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

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

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

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

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.
Reply
#8

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)