Re: Usability process (fix)
- From: Bruno Mairlot <bruno virgoplus com>
- To: gnome-db-list gnome org
- Subject: Re: Usability process (fix)
- Date: Thu, 16 Dec 1999 02:10:33 +0100
Joe Williams wrote:
>
> >The error msg is "Can't connect to MySQL server on localhost (111)".
>
> > But what does mean the 111 ?
> > And what's missing ?
>
> > Any suggestion ?
>
> > Cheers,
> > Bruno
>
> Okey, '111'(ECONNREFUSED) is the errno forwarded from connect() through
> mysql. I looked at the code and it appears that the options from the DSN
> configuration area wasn't being passed onto mysql. The fix is:
>
> Starting at line 206 of gda-mysql-server/gda-mysql-connect.c we have
> a bunch of strcasecmp's. These need to be changed to strncasecmp's like
> the DATABASE case, otherwise everything in the DSN field in options
> is ignored(except for DATABASE) IE:
>
> if (strncasecmp(ptr_s, "HOST", strlen("HOST")) == 0)
> cnc->host = get_value(ptr_s);
> else if (strncasecmp(ptr_s, "DATABASE", strlen("DATABASE")) == 0)
> cnc->db = get_value(ptr_s);
> else if (strncasecmp(ptr_s, "PORT", strlen("PORT")) == 0)
> cnc->port = get_value(ptr_s);
> else if (strncasecmp(ptr_s, "UNIX_SOCKET", strlen("UNIX_SOCKET")) == 0)
> cnc->unix_socket = get_value(ptr_s);
> else if (strncasecmp(ptr_s, "FLAGS", strlen("FLAGS")) == 0)
> cnc->flags = get_value(ptr_s);
>
> Other stuff appears to be broken still, though. (I entered a select
> statement into the window and did hit the 'Execute SQL' button and had
> a million windows pop onto my screen with the error message:
> gda-connection.c: 54: gda_connection_real_error called
> new adjustment value = 0
> gda-recordset.c: 63: gda_recset_value_changed called
> adj->value = 1
> rs->current = 0
> offset = 1
I got the same as you, though, I had another problem :
Even with your fix, I can't connect to the database, because, the params
that are passed to mysql_real_connect aren't the right.
Instead, it seems that there is no value at all, and then, I have a
classical error :
Access denied for bruno@arwen.virgoplus.com (using PASSWORD=NO).
Wether I give gdafe the right login and the right password.
So I tried to allow bruno connecting without password, and it worked.
Then at the first query, I also got a million window about errors.
>
> being printed). I know at least the connection is working though since
> I can get a list of the tables in the object-browser.
>
> Joe
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]