[mapserver-users] OGR connection failure (with mysql log)
Juni Adi
skiper at infojawa.org
Thu Mar 12 01:36:34 PDT 2009
Hello,
I'm still struggling to connect mapscript to MySQL using OGR direct
connection here.
I've been logging mysql query to myslLOG.log.
The ogrinfo successfull connection from commandline:
[root at server]# su -fm apache
bash: /root/.bashrc: Permission denied
[apache at server]$ /usr/bin/ogrinfo base.ovf
ERROR 4: Update access not supported for VRT datasources.
Had to open data source read-only.
INFO: Open of `/home/infojawa/maps_data/jawa/base.ovf'
using driver `VRT' successful.
1: base
mysqlLOG.log says:
26 Connect root at localhost on mapserver
26 Query SHOW KEYS FROM `base`
26 Field List base
now when I access the web,
*Warning*: [MapServer Error]: msOGRFileOpen(): Open failed for OGR
connection in layer `base'. Failed to open datasource
`MySQL:mapserver,user=xxxx,password=xxxx,tables=base'. in
*/home/infojawa/maps/jawa.inc.php* on line *552*
mysqlLOG.log doesn't say anytihing at all. Seems like mapscript/OGR
never did any connection to mysql server.
Does anyone ever find similar problem?Any idea will be highly appreciated
Thanks in advance
Junek
PS: I have rebuilt gdal/ogr again, --with-mysql=/usr/bin/mysql_config
--with-unixODBC-includes --with-unixODBC-libs
Frank Warmerdam wrote:
> Juni Adi wrote:
>> Hi all,
>>
>> I've just installed mapserver with php_mapscript enabled on my centos5 :
>> mapserver-5.2.1
>
> Judi,
>
> I don't know how mysql permissions work, but I'd suggest reviewing
> whether
> the apache account has permissions to access mysql. I don't see any
> other
> obvious reason things wouldn't work assuming the same libraries are being
> used in both configurations.
>
> Best regards,
More information about the MapServer-users
mailing list