[GRASSLIST:5017] Re: latest 5.7-cvs can't connect to MySQL

Dylan Beaudette dylan at iici.no-ip.org
Wed Dec 1 16:29:10 EST 2004


Just noticed that there was a change in the mysql driver in db.c according to 
the changelog:

-------------------------------------------------------
2004-11-24 10:14  radim

 * db/drivers/: postgres/db.c, postgres/parse.c, mysql/db.c: login
-------------------------------------------------------

is see that some lines have been commented out in db.c:

-------------------------------------------------------
 else if ( strncmp(tokens[i], "user", 4 ) == 0 )
        G_warning ( "'user' in database definition is not supported, use 
db.connect" );
       /* myconn->user = G_store ( tokens[i] + 5 ); */
    else if ( strncmp(tokens[i], "password", 8 ) == 0 )
        G_warning ( "'password' in database definition is not supported, use 
db.connect" );
       /* myconn->password = G_store ( tokens[i] + 9 ); */
-------------------------------------------------------

...so that would explain what the errors are all about in my previous post. 
Now the question would be, where can I safely specify my username and 
password for connecting to the MySQL db?

thanks,


On Wednesday 01 December 2004 01:06 pm, Dylan Beaudette wrote:
> Hi everyone,
>
> I just noticed that I can no longer connect to my MySQL tables from within
> GRASS 5.7-cvs..
>
> before I could execute:
> db.connect driver=mysql
> database="host=localhost,dbname=test,user=xxxx,password=xxxx"
>
> and i could then work with tables in MySQL...
>
> now, even after setting the connection parameters with db.connect, i get
> the following errors when executing `db.tables -p`:
>
> -------------error messages-------------
> db.tables -p
> WARNING: 'user' in database definition is not supported, use db.connect
> WARNING: 'password' in database definition is not supported, use db.connect
> DBMI-MYSQL driver error: mysql_real_connect() error (1045): Access denied
> for user: 'dylan at localhost' (Using password: NO)
> ------------------------------------------------
>
> and the following shows up in mysql.log
> ----------mysql.log------------
> Access denied for user: 'dylan at localhost' (Using password: NO)
> ----------------------------------
>
> ...somehow GRASS 5.7-cvs from last month was able to connect to mysql, but
> the latest one is having problems passing some parameters (username and
> password) to mysql
>
> any ideas?
>
> thanks in advance

-- 
Dylan Beaudette
Soil Science Graduate Group
University of California at Davis




More information about the grass-user mailing list