Re: Fwd: gasql questions



> 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

(BTW: The flags field has to do with other stuff: whether to use compression,
      whether to behave in a ODBC friendly manner, etc)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]