Re: Fwd: gasql questions
- From: cwiegand startek com (Chris Wiegand)
- To: gnome-db-list gnome org
- Subject: Re: Fwd: gasql questions
- Date: Mon, 27 Mar 2000 15:25:17 -0700
Yes, there definitely should be a way to specify that info. Hmm.......you
probably *could* put the username and password into the FLAGS section (ie.
FLAGS=-u username -p password), however, a) I'm new to the code, and b) I'm
at work, or I'd get into it and do a little debug, and c) that's probably a
BAD way to do that. When I get home tonight I'll take a look at the code
and probably make a patch to start fixing the mysql provider.
At 02:40 PM 3/27/00 -0500, Joe Williams wrote:
>> Could anyone help me with what to answer to this mail as I have no
knowledge
>> of the mysql provider:
>>
>> ---------- Forwarded Message ----------
>> Subject: gasql questions
>> Date: Fri, 17 Mar 2000 13:51:25 -0700 (MST)
>> From: David Patterson <daz@satx.rr.com>
>>
>>
>> 'aloo. Im having this issue with this software. (yes, I am reading the
>> docs). According to them, to connect to mysql, I need to provide some
>> flags. No problem. The flags I need to pass are username and password.
>> When using the 'mysql' client, I use them like so: 'mysql -u username -p
>> password (or blank, and it will prompt). with gdafe, I have this line:
>> DSN=DATABASE=dbname;HOST=myhost.host.com;PORT=3306;FLAGS=-u -p
>
> Unfortunatly, it looks like gda_open_connection is broken. It's
>pulling the username and password from the Gda_MYSQL_Connection structure,
>and it *appears* that the username and password fields are never initialized
>anywhere. A *completetly untested* fix is thus:
>
>gda-mysql-server/gda-mysql-connection.c, line 218, insert:
>
> cnc->user = g_strdup(user);
> cnc->password = g_strdup(passwd);
>
> Which will allow you to specify the username/password at the login
>dialog. But there is still a question, the docs for gda_connection_open say:
>
>"""
> If user or pwd is not NULL, it will overwrite the appropriate entry in the
> DSN passed as par2. Entries in the DSN have the form = seperated
> from the database name . Currently the DSN is not parsed.
>"""
>
> Currently there is no way to specify a username/password in the DSN
>for MySQL, should there by, like the docs above suggest?
>
> Joe
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]