Mysql Problem

General support questions including new installations

Mysql Problem

Postby 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: Select all
## 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" => "", //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" => "", //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" => "",
      "rcon_port" => "28962",
      "rcon_pass" => "xxxxxxxx",
[Moderator edit: Added code tags to preserve formatting.]

However I only get this error
Warning: mysql_pconnect() [function mysql-pconnect]: Can't connect to MYSQL server on '' (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 :-(
Posts: 4
Joined: 2011/06/03 04:05:05

Mysql Problem

Postby pschaff » 2011/06/06 17:01:31

Welcome to the CentOS fora. Reading FAQ & Readme First 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: Select all
setenforce 0
service iptables stop
Retired Moderator
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: Mysql Problem

Postby hansolo » 2011/06/06 17:10:00


Probably you have problems on your home server with MySQL database hosted, and for that you should enable mysql remote connections
for example

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

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

Return to CentOS 5 - General Support

Who is online

Users browsing this forum: No registered users and 3 guests