Re: Problems connecting to mysql

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

 



It's possible that PHP on the Linux box has a different mysql client
driver version than the FreeBSD box...

I would expect a more detailed error message in that base, but maybe
not...

Your command line in Linux could be using yet another different client
version.

Check output from these:
<?php phpinfo();?>
mysql -v

On both boxes in all combinations, and see if the version numbers all
match up.

On Fri, June 8, 2007 5:46 pm, Tom Cruickshank 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
>
>
>
>
> 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
>
>


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
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