Trouble With Connecting MySql to UCP
#1

Hi Everyone,

First off I was unsure of where to put this, so sorry if it's int he wrong place. I seem to be having a problem connecting MySql to my User Control Panel (UCP). The game host I am using is Serverffs. I created the database and entered all the information correctly but I can't seem to find out what's going on and need some help. Basically here is the message I am getting

Код:
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on '127.0.0.1' (10061) in D:\hosting\8291812\html\ucp\inc\classes\MySQLHandler.php on line 25
Can't connect to MySQL server on '127.0.0.1' (10061)
I am pretty sure I have everything right but I will provide the code for that above warning.

Code For Line 25:
Код:
$this->con = mysql_connect("127.0.0.1","XXXXXXX","XXXXXXXX","XXXXXXXX");
I have it all right I just used X for privacy.


Also here is the Config and that's all the information entered.

Код:
/****MySQL Configuration****/
$config['db_host'] = "127.0.0.1";
$config['db_user'] = "XXXX";
$config['db_pass'] = "XXXX";
$config['db_name'] = "XXXX"; 
$config['table_prefix'] = "samp_accounts";
I hope someone can help me, if you need more information let me know. Thanks
Reply
#2

I don't know, but why you need con = mysql_connect(...); ?
Reply
#3

I am using that code because basically that is what is used to create a connection to MySql.
Reply
#4

The problem is maybe because the UCP is not using IP 127.0.0.1
Reply
#5

Quote:
Originally Posted by Pinguinn
Посмотреть сообщение
The problem is maybe because the UCP is not using IP 127.0.0.1
Well I was assuming it was 127.0.0.1 because that seems to be what ServerFFS is using at the host name. Did you have any suggestions?
Reply
#6

Use your server IP.
Reply
#7

Ok I'll try my server's I.P Address and tell the result to everyone.
Reply
#8

No, I've read the serverFFS forum and it seems that using IP 127.0.0.1 correct is
Try replacing
Код:
$this->con = mysql_connect("127.0.0.1","XXXXXXX","XXXXXXXX","XXXXXXXX");
with
Код:
$this->con = mysql_connect("127.0.0.1","XXXXXXX","XXXXXXXX","XXXXXXXX") or die(mysql_error());
Then tell the result
Reply
#9

I still seem to be getting the same Warning

Код:
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on '127.0.0.1' (10061) in D:\hosting\8291812\html\ucp\inc\classes\MySQLHandler.php on line 25
Can't connect to MySQL server on '127.0.0.1' (10061)
And this is what I have on line 25 on that file:

pawn Код:
$this->con = mysql_connect("127.0.0.1","XXXX","XXXX","XXXX") or die(mysql_error());if($this->con)
Reply
#10

Quote:
Originally Posted by Phoenix_Roleplay
Посмотреть сообщение
I still seem to be getting the same Warning

Код:
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on '127.0.0.1' (10061) in D:\hosting\8291812\html\ucp\inc\classes\MySQLHandler.php on line 25
Can't connect to MySQL server on '127.0.0.1' (10061)
And this is what I have on line 25 on that file:

pawn Код:
$this->con = mysql_connect("127.0.0.1","XXXX","XXXX","XXXX") or die(mysql_error());if($this->con)
You are still using 127.0.0.1 here.

Use the game server IP.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)