ogr 1.3.2 -> mysql

Frank Warmerdam warmerdam at POBOX.COM
Fri Jun 2 10:18:55 EDT 2006


robert fritz wrote:
> Hello,
> 
> I have just installed the latest MS4W package, built with GDAL/OGR 
> 1.3.2. Now I'm trying to connect to MySQL using OGR but I get an error 
> message:
> ------>>>>
> [02-Jun-2006 15:01:08] PHP Warning:  [MapServer Error]: msOGRFileOpen(): 
> Open failed for OGR connection `MYSQL:lurchingen'.
> MySQL connect failed for: lurchingen

Robert,

You need a DATA statement indicating the table you want to access within
this database connection.  If you don't have a DATA statement, MapServer
will try to extract it from the connection string, breaking on the first
comma.  But of course you need the commas as part of the connection string.
That is why all the user=root stuff is missing in the error message.

Best regards,

> Access denied for user 'ODBC'@'localhost' <mailto:'ODBC'@'localhost'> 
> (using password: NO)
> ------<<<<
> 
> My map-file configuration :
> ------>>>>
> LAYER
>     NAME "fs_mysql"
>     TYPE Polygon
>     STATUS ON
>  connectiontype ogr
>  connection 
> "MYSQL:lurchingen,user=root,password=lala,host=localhost,port=3306"
>  CLASS   
>         COLOR 23 1 226
>      &n bsp;  OUTLINECOLOR 0 0 0
>     END
>     TEMPLATE "x"   
> END
> ------<<<<
> 
> I have checked the connection and the table using ogrinfo, included by 
> the ms4w package, and everything works fine there.
> 
> What is wrong with my mapfile configuration?
> 
> Robert
>  
> 
> 
> 
> Verschicken Sie romantische, coole und witzige Bilder per SMS!   
> Jetzt bei WEB.DE FreeMail: *http://f.web.de/?mc=021193*  
> 


-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org



More information about the mapserver-users mailing list