|
Posted by C. on 08/15/07 11:53
On 14 Aug, 22:38, Jerim <wyo...@gmail.com> wrote:
> On Aug 14, 3:39 pm, burgermeiste...@gmail.com wrote:
> > On Aug 14, 3:18 pm, Jerim <wyo...@gmail.com> wrote:
>
> > > I have a script on one server, trying to access the MySQL database on
> > > another server. The server with the script is on an outside network,
> > > hosted with another company. The MySQL server is here in the
> > > office;behind a firewall. Script works fine when it is on the local
> > > machine, but when I moved it to the offsite webserver it gives me:
>
> > > Warning: mysql_connect() [function.mysql-connect]: Lost connection to
> > > MySQL server during query in /directory/directory2/functions/
> > > shared_data_connections.php on line 29
> > > Unable to connect to database.
>
<snip>
> > > One obvious problem could be the firewall. But since making any
> > > adjustments to the firewall is frowned upon around here,
! of course its frowned upon but you need to work out what the problem
is before you worry whether or not it needs to be changed.
Really this is not a PHP question - try using the MySQL command line
interface. The error suggests that PHP is able to conect to the server
but subsequently loses the connection - in which case its not simple
port blocking (AFAIK, unlike FTP, MySQL uses a single connection from
client to server).
I'd suggest you sit down with your local friendly network admin
(ignoring the oxymoron) the mysql cli tool and a copy of wireshark and
see if you can replicate the error.
C.
Navigation:
[Reply to this message]
|