MySQL Connection through a SmoothWall Firewall

Posted on 2004-09-30
Last Modified: 2006-11-17
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.
Question by:ChadMarsh
  • 2
  • 2
LVL 13

Accepted Solution

cLFlaVA earned 500 total points
ID: 12191954
are you declaring the server/port like this:

    $hostname = "servername:port";

Author Comment

ID: 12191984
Thank you..Always something simple.
LVL 13

Expert Comment

ID: 12192053
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".

Author Comment

ID: 12192069
OK thanks for the tip.

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sql query on a varchar that is numeric. 8 43
How to send multiple emails at the same time in PHP 12 70
MS Access - need to reduce row size 25 60
AWS EC2 & RDS Instance 5 50
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In a recent question ( here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question