I have gdal 1.3.1 on my desktop Win32 box and on a linux server. I am using a virtual datasource to connect to a MySQL database. <br><br>On my desktop, I can successfully get the layer from the database using the following .ovf file.
<br><br><OGRVRTDataSource><br><br> <OGRVRTLayer name="aqidata"><br> <SrcDataSource>MYSQL:aqiTest,user=uuuu,password=pppp,host=<a href="http://10.4.5.100">10.4.5.100</a>,port=3306,tables=testdata</SrcDataSource>
<br> <SrcLayer>testdata</SrcLayer> <br> <GeometryType>wkbPoint</GeometryType><br> <GeometryField encoding="PointFromColumns" x="x" y="y"/> <br> </OGRVRTLayer>
<br><br></OGRVRTDataSource> <br><br>Here is the returned data including the first two features:<br><br>C:\CFusionMX7\wwwroot\aqi>ogrinfo newlocal.ovf -al<br>ERROR 4: Update access not supported for VRT datasources.
<br>Had to open data source read-only.<br>INFO: Open of `newlocal.ovf'<br>using driver `VRT' successful.<br><br>Layer name: aqidata<br>Geometry: Point<br>Feature Count: 9<br>Extent: (278128.625000, 4874412.500000) - (747461.095000
, 5317595.030000)<br>Layer SRS WKT:<br>(unknown)<br>areaID: String (10.0)<br>x: Real (0.0)<br>y: Real (0.0)<br>sampleValue: Integer (0.0)<br>OGRFeature(aqidata):0<br> areaID (String) = 2<br> x (Real) = 282951.219<br> y (Real) =
5188779.5<br> sampleValue (Integer) = 20<br> POINT (282951.21899999998 5188779.5 0)<br><br>OGRFeature(aqidata):1<br> areaID (String) = 1<br> x (Real) = 407618.438<br> y (Real) = 5134528.5<br> sampleValue (Integer) = 20
<br> POINT (407618.43800000002 5134528.5 0)<br><br><br>I edit this file, changing only the user, password, and host to match the database user on the server, and it does not work with ogrinfo on the server. A little redundant, but here is the .ovf.
<br><br><OGRVRTDataSource><br><br> <OGRVRTLayer name="aqidata"><br> <SrcDataSource>MYSQL:aqiTest,user=uuu,password=pppp,host=<a href="http://192.168.1.100">192.168.1.100</a>,port=3306,tables=testdata</SrcDataSource>
<br> <SrcLayer>testdata</SrcLayer> <br> <GeometryType>wkbPoint</GeometryType><br> <GeometryField encoding="PointFromColumns" x="x" y="y"/> <br> </OGRVRTLayer>
<br><br></OGRVRTDataSource> <br><br>The error that I get is:<br>ERROR 4: Update access not supported for VRT datasources.<br>ERROR 1: Failed to open datasource `MYSQL:aqiTest,user=uuu,password=ppp,host=<a href="http://192.168.1.100">
192.168.1.100</a>,port=3306,tables=testdata'.<br>FAILURE:<br>Unable to open datasource `/web/maps/aqi/aqidata.ovf' with the following drivers.<br> -> ESRI Shapefile<br> -> UK .NTF<br> -> SDTS<br> -> TIGER<br>
-> S57<br> -> MapInfo File<br> -> DGN<br> -> VRT<br> -> AVCBin<br> -> REC<br> -> Memory<br> -> CSV<br> -> GML<br> -> ODBC<br> -> PGeo<br><br><br>I don't believe that it is an issue with the user, password, table, or
host because when I tweak these on my desktop and hit the file with
ogrinfo, I get a more specific error message that references the
parameter that is wrong. <br><br>If I use the mysql client on the server to connect directly to the database with this user, password, host, a SELECT query successfully returns the expected data. To determine if the db user needed more than SELECT rights, I expended the user rights to ALL and this didn't change anything. I also expanded file rights for the dir that the .ovf is in.
<br><br>Could there be a case sensitivity issue on the linux box? (I believe that all case is correct though) I can't really think of anything else. <br><br>David.<br><br><br> <br>