Re: Problems connecting to mysql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/9/07, Tom Cruickshank <tcruicksh@xxxxxxxxx> wrote:
It is definitely on a separate machine.

I have host as '%' in the user table in the mysql database.
When I used the command line "mysql -u some_user -p -h xxx.xxx.xxx.xxx
It was in a local and remote setting (ie, done in the linux machine and
freebsd machine).

If it didn't work via command line, it would give me a starting point to
work on, as of right now, I just don't get it. I'm starting to think
something somewhere is not compatible or configured. But in my opinion it
*should* be possible to connect from a linux to bsd box and vice versa.


Hope this Helps.

Tom

Ok, did you check the logs of Apache if any detailed error is reported?

And what about the logs of your MySQL server on the FreeBSD box?

Oh, and PHP code maybe?

Tijnema


-----Original Message-----
From: Tijnema [mailto:tijnema@xxxxxxxxx]
Sent: June 8, 2007 7:00 PM
To: Tom Cruickshank
Cc: php-general@xxxxxxxxxxxxx
Subject: Re:  Problems connecting to mysql

On 6/9/07, Tom Cruickshank <tcruicksh@xxxxxxxxx> wrote:
> Hello,
>   I was using a FAMP (FreeBSD Apache MySQL PHP) server for some web
> development I was doing. Then I had to switch over the php pages to a
Linux
> box, however, the database is still on FreeBSD. Does that make any
> difference?
>
> The reason why I ask is because I keep getting this error.
>
> I use "die ('Could not connect: ' . mysql_error());"
> Could not connect: Can't connect to MySQL server on xxx.xxx.xxx.xxx (13).
>
> If I use "die ('Could not connect: ' . mysql_errno());"
> Could not connect: 2003
>
> I did some research on error 2003 and it appears that I would see this if
> communication access was not established.
>
> However, if I try connecting to the mysql database using the command line
> I have no problems.
>
> Mysql -u some_user -p -h xxx.xxx.xxx.xxx
>
> This only started after I started using linux as web server and freebsd as
> database.
>
> If there is a more appropriate mailing list to ask this questions, please
> feel free to direct me towards it.
>
> Tom
>
Since the database is on FreeBSD, it's a seperate machine?
This probably means that you're not allowed to connect to the machine
by LAN, but only through localhost, and you should take a look at your
mysql config file on the FreeBSD machine.
Where do you run the command line? on your freeBSD machine or your Linux
box?

Tijnema

Internal Virus Database is out-of-date.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 269.6.1/778 - Release Date: 27/04/2007
1:39 PM


Internal Virus Database is out-of-date.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 269.6.1/778 - Release Date: 27/04/2007
1:39 PM




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux