[GRASSLIST:2810] Re: problem with db.databases

Radim Blazek blazek at itc.it
Tue Mar 2 13:13:31 EST 2004

On Tuesday 02 March 2004 16:23, Christopher Fonnesbeck wrote:
> I have the mysql driver compiled in 5.7, and have been using it to
> store vector attributes. Running db.tables -p successfully prints all
> of the tables in the database specified:
> GRASS 5.7.-cvs:~ > db.tables -p
> basins
> distcode
> streams_ugr
> ugr_boundary
> vegmgt
> However, running db.databases gives an error:
> DBMI-MYSQL driver error: Error: connect Mysql: Unknown database
> 'dbname=ugr,user=chris'
> ERROR: Cannot list databases.
> This should work, shouldn't it?

mysql driver must be rewritten. I see mysqlhost = G__getenv("DB_HOST"); etc in the code. 
I think that db_driver_list_databases() does not make sense for most 
drivers, it is relict from 5.0 dbmi. In theory db_driver_list_databases()
should list all directories in filesystem for dbf, and all databases on
all servers (all ports) on all computers in the net for postgres/mysql.

I have removed db.databases, db.createdb and db.dropdb from db/base/Makefile.


More information about the grass-user mailing list