[mapserver-users] Could not read data from MySQL database

Fawcett, David (MPCA) David.Fawcett at state.mn.us
Fri Sep 17 10:14:41 EDT 2010


I don't know if this applies to your case at all.  In other cases where people have had mysql connections fail, it has sometimes been due to the lack of mysql support in ogr.  One question to figure out is whether the ogr being used by MapServer is the same ogr that you are hitting when you run ogrinfo.  

David.

-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Murat Beyhan
Sent: Thursday, September 16, 2010 5:18 PM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Could not read data from MySQL database

Dear Friends,

I was succeeded to read and draw data from MySQL database using OGR
connection until upgrade mapserver and gdal.

Now I use the same codes but could not read data form MySql database.
I have created tables using ogr2ogr again.
but still When I open webpage the following error message occurred.

msDrawMap(): Image handling error. Failed to draw layer named 'sea'.
msOGRFileOpen(): OGR error. Open failed for OGR connection in layer
`sea'. File not found or unsupported format.

What is wrong for that, please help.

When I try ogrinfo as follows it works
[murat at localhost mapdata]$ ogrinfo
"MySQL:testogr,user=root,password=mysql_123"
INFO: Open of `MySQL:testogr,user=root,password=mysql_pass'
      using driver `MySQL' successful.
1: deniz (Polygon)
2: il_merkezleri (Point)
3: il_sinirlari (Polygon)
4: ilce_merkezleri (Point)
5: ilce_sinirlari (Polygon)
6: iller (Polygon)
7: iller_sil (Polygon)
8: komsular (Polygon)
[murat at localhost mapdata]$


AND 
my mapserver version info as follows

[murat at localhost mapdata]$ mapserv -v
MapServer version 5.2.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=ICONV
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS
INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

and 
[murat at localhost mapdata]$ ogrinfo
--formats                                                        
Supported
Formats:                                                                                  
  -> "ESRI
Shapefile" (read/write)                                                                  
  -> "MapInfo
File" (read/write)                                                                    
  ->
"UK .NTF" (readonly)                                                                           
  -> "SDTS" (readonly)
  -> "TIGER" (read/write)
  -> "S57" (read/write)
  -> "DGN" (read/write)
  -> "VRT" (readonly)
  -> "REC" (readonly)
  -> "Memory" (read/write)
  -> "BNA" (read/write)
  -> "CSV" (read/write)
  -> "GML" (read/write)
  -> "GPX" (read/write)
  -> "KML" (read/write)
  -> "GeoJSON" (read/write)
  -> "Interlis 1" (read/write)
  -> "Interlis 2" (read/write)
  -> "GMT" (read/write)
  -> "SQLite" (read/write)
  -> "ODBC" (read/write)
  -> "PGeo" (readonly)
  -> "OGDI" (readonly)
  -> "MySQL" (read/write)
  -> "PCIDSK" (readonly)
  -> "XPlane" (readonly)
  -> "AVCBin" (readonly)
  -> "AVCE00" (readonly)
  -> "DXF" (read/write)
  -> "GRASS" (readonly)
  -> "Geoconcept" (read/write)
  -> "GeoRSS" (read/write)
  -> "GPSTrackMaker" (read/write)
  -> "VFK" (readonly)








-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users



More information about the mapserver-users mailing list