Mysql Problem

General support questions including new installations
Post Reply
PsYc0TiC
Posts: 4
Joined: 2011/06/03 04:05:05

Mysql Problem

Post by PsYc0TiC » 2011/06/03 04:28:09

This may not be the place to ask but here goes..

I am trying to make a page on my webserver (shared I.P. address) talk to the mysql database on my game server (in my house) running CentOS5.5 (64 bit)

I have created a database on the web server called bitchnip_echelon (prefix required on shared webserver) and I have 2 databases on the game server b3db1 and b3db3.

Here is hte data that the page is trying to use to talk to the databases on the game server:
[code]
## settings for the echelon database (shared I.P. webserver)
$hostname_wwwvalidate = "localhost";
$database_wwwvalidate = "bitchnip_echelon";
$username_wwwvalidate = "psyco";
$password_wwwvalidate = "xxxxxxxx";

## settings for your b3 databases
$config = array(
"clanname" => "BitchNipples",
//How many servers do we have down here
"numservers" => 2,
"servers" => array(
1 => array(
"name" => "BitchNipples CTF",
// Database connection for the B3
"hostname" => "xx.xxx.xxx.xx", //this is the I.P. of my game server in my house
"database" => "b3db1",
"username" => "psyco",
"password" => "xxxxxxx",
//Set up rcon for talkback (need chatlogger plugin installed) and PB banning facilities
"rcon_ip" => "xx.xxx.xxx.xx", //same I.P. as above
"rcon_port" => "28960",
"rcon_pass" => "xxxxxxxxx",
),
2 => array(
"name" => "BitchNipples FFA",
// Database connection for the B3
"hostname" => "localhost",
"database" => "b3db3",
"username" => "psyco",
"password" => "xxxxxxxx",
//Set up rcon for talkback (need chatlogger plugin installed) and PB banning facilities
"rcon_ip" => "xx.xxx.xxx.xx",
"rcon_port" => "28962",
"rcon_pass" => "xxxxxxxx",
[/code][Moderator edit: Added [i]code[/i] tags to preserve formatting.]

However I only get this error
Warning: mysql_pconnect() [function mysql-pconnect]: Can't connect to MYSQL server on '76.107.226.120' (4) in /home/bitchnip/public_html/echelon/Connections/b3connect.php on line 37

I have tried many things but I am lost at this point

Can anyone help me with this?

Thank you in advance :-(

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Mysql Problem

Post by pschaff » 2011/06/06 17:01:31

Welcome to the CentOS fora. Reading [url=https://www.centos.org/modules/newbb/viewforum.php?forum=47]FAQ & Readme First[/url] is recommended for new users.

"CentOS 5 - X86_64, s390(x) and PowerPC Support" was definitely not the correct forum for your post so I am moving you to "CentOS 5 - General Support" to get a better audience.

You would risk offending fewer people if you obfuscated some of the names in your configuration. Showing your public IP address is not a great idea either.

Have you tried temporarily disabling the firewall and SELinux to make sure it is not a problem with ports blocked or SELinux contexts?[code]setenforce 0
service iptables stop[/code]

hansolo
Posts: 231
Joined: 2010/01/13 11:17:42
Location: SI

Re: Mysql Problem

Post by hansolo » 2011/06/06 17:10:00

Hi

Probably you have problems on your home server with MySQL database hosted, and for that you should enable [url=http://www.google.com/search?hl=en&source=hp&biw=1144&bih=705&q=configure+mysql+to+allow+remote+connections&aq=0&aqi=g5g-v2g-j3&aql=&oq=configure+mysql+to+]mysql remote connections[/url]
for example
[url=http://www.ghacks.net/2009/12/27/allow-remote-connections-to-your-mysql-server/]allow-remote-connections-to-your-mysql-server[/url]
or
[url=http://developer.mindtouch.com/en/kb/Enabling_remote_access_to_MySQL_database]Enabling_remote_access_to_MySQL_database[/url]

and then open the IPTABLES port to which you want to allow connections.


good luck

Post Reply