Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 369
  • Last Modified:

MySQL Connection through a SmoothWall Firewall

Hello Experts,
I have opened a port on our SmoothWall firewall to connect to a MySQL box from outside of the firewall.
When the expected IP address comes in the firewall forwards it to the MySQL box.
I keep getting a unable to connect error.  I am using PHP and here is my code

$hostname = "firewall IP address";
$username = "username";
$database_CAB = "database";
$password_CAB = "password";
$CON = mysql_pconnect($hostname, $username, $password) or trigger_error(mysql_error(),E_USER_ERROR);
mysql_select_db($database, $CON);

If I need to post this in another section like PHP or Firewall, please let me know.
Any help would be greatly appreciated.
Thanks
Chad
0
ChadMarsh
Asked:
ChadMarsh
  • 2
  • 2
1 Solution
 
cLFlaVACommented:
are you declaring the server/port like this:

    $hostname = "servername:port";
0
 
ChadMarshAuthor Commented:
Thank you..Always something simple.
0
 
cLFlaVACommented:
lol - glad to help, I originally avoided this question because the title scared me.  Next time dumb it down a bit :)

Maybe something like "I can't get a connection".
0
 
ChadMarshAuthor Commented:
OK thanks for the tip.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now