You are here: mysql_connect problem « PHP SQL « IT news, forums, messages
mysql_connect problem

Posted by greasydan on 07/25/06 09:38

Hi All,

I've got MySQL 5.0.21 running on Windows Server 2003, and php running
on Apache on a Linux box (Fedora Core 4).

Previously when the pages were running on an IIS server the connection
was succesful, now I get:

Can't connect to MySQL server on 'SERVER' (13)

I'm connecting using:

$db = mysql_connect("SERVER", "USER", "PASSWORD")
or die("Could not connect to database:
".mysql_error());
mysql_select_db("DATABASE", $db)
or die("Could not select database: ".mysql_error());

However from the linux box I can connect no problems using:
mysql --host=SERVER -u USER -p

My phpinfo() relating to MySQL is as follows:
>From phpinfo():

Active Persistent Links 0
Active Links 0
Client API version 4.1.11
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib/mysql -lmysqlclient

Can anyone help point me in the right direction to solve this one?
Cheers
Dan

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация