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

Murat Beyhan beyhan at deprem.gov.tr
Thu Sep 16 15:17:54 PDT 2010


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.




More information about the MapServer-users mailing list