[FGS] [newbies] fgs-mapserver and mysql

julien.63 at free.fr julien.63 at free.fr
Tue May 23 17:14:50 EDT 2006


Hi,
I'm using the fgs-mapserver package and going through tutorials to see how it
works.
As i want to use databases i've installed the mysql package.

[julien at localhost fgs]$ fgs install php_mysql-module:4.4.2
http://www.maptools.org/dl/fgs/modules/current
+ Installing php_mysql-module:
  + Getting and extracting module 'php_mysql-module'... ok
+ Copying all files into FGS environment... ok
* Module 'php_mysql-module' installed with success.

So i have :
/home/julien/fgs/www/lib/php4/php_mysql.so
/home/julien/fgs/www/lib/php4/mysql.so
/home/julien/fgs/www/lib/php4/mysql-4.4.2.so

i guess some mysql stuff were already installed, but i didn't check before :-/

I've restarted apache.

But when i make a simple phpinfo(), i have nothing about mysql.
And when i try to connect :
<?
dl('php_mapscript.so');
dl('mysql.so');
$connect = mysql_connect("localhost:8080","mysql","password") or die("error
connexion");
?>

i have an error message :
Warning: mysql_connect(): Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (2) in /home/julien/fgs/www/htdocs/test.php on line 12

I know i must have made something wrong, but i don't know what?

Is it possible to connect to mysql ($ mysql -u user -p)?

thanks for your help

Julien




More information about the Foss-gis-suite mailing list