From owner-freebsd-database@FreeBSD.ORG Mon May 12 03:48:42 2003 Return-Path: Delivered-To: freebsd-database@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6730437B401 for ; Mon, 12 May 2003 03:48:42 -0700 (PDT) Received: from mailhub1.isdnet.net (mailhub1.isdnet.net [195.154.209.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 187C843FAF for ; Mon, 12 May 2003 03:48:41 -0700 (PDT) (envelope-from anselme@netcourrier.com) Received: from [192.168.1.113] (ppp1640-cwdsl.fr.cw.net [62.210.118.109]) by mailhub1.isdnet.net (8.9.3p2/8.9.3) with ESMTP id MAA56261 for ; Mon, 12 May 2003 12:48:38 +0200 (CEST) From: Anselme To: freebsd-database Content-Type: text/plain Organization: Message-Id: <1052736418.280.23.camel@Toto.dippgw.homedns.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4 Date: 12 May 2003 12:46:59 +0200 Content-Transfer-Encoding: 7bit Subject: MySQL & jdbc X-BeenThere: freebsd-database@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Database use and development under FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2003 10:48:42 -0000 Hi everybody ! I've got a little problem trying to get access to MySQL with a java application. I use : mysql 3.23.55 linux-sun-jdk1.3.1.07_1 mysql-jdbc-mm FreeBSD 4.7-STABLE I got the connection with MySQL vi jdbc without problem but i can't access the database as the user ... I got the following from the server : #java.sql.SQLException: Invalid authorization specification: Access denied for user: 'user_name@localhost.mydomain.com' (Using password: YES) The rights in MySQL sounds good because when I try to access by the console, it's all fine. In the java program, I have the following code : dbcxn = DriverManager.getConnection("jdbc:mysql://localhost:3306/db_name?user=user_name&password=user_pwd") I also tryed with : dbcxn = DriverManager.getConnection("jdbc:mysql://localhost:3306/db_name","user_name","user_pwd"); Any Ideas ? Thanks -- Anselme From owner-freebsd-database@FreeBSD.ORG Mon May 12 04:03:31 2003 Return-Path: Delivered-To: freebsd-database@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7BA7B37B401 for ; Mon, 12 May 2003 04:03:31 -0700 (PDT) Received: from mail.die.supsi.ch (mail.die.supsi.ch [193.5.153.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id C08D243FF2 for ; Mon, 12 May 2003 04:03:25 -0700 (PDT) (envelope-from nunnari@die.supsi.ch) Received: from die.supsi.ch (pcm2022.die.supsi.ch [193.5.152.22]) by mail.die.supsi.ch (8.11.6/8.11.6) with ESMTP id h4CB3FY13263; Mon, 12 May 2003 13:03:15 +0200 Message-ID: <3EBF7F73.1090502@die.supsi.ch> Date: Mon, 12 May 2003 13:03:15 +0200 From: Roberto Nunnari User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Anselme References: <1052736418.280.23.camel@Toto.dippgw.homedns.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-database Subject: Re: MySQL & jdbc X-BeenThere: freebsd-database@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Database use and development under FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2003 11:03:31 -0000 if this doesn't work: # mysql -u username -p yourdbname then check your mysql user table: > use mysql; > select host, user, password from user; you should have an entry for username@localhost with password Anyways, in my java code I use: getConnection( "jdbc:mysql://localhost/mydbname", "myusername", "mypassword" ); regards. Anselme wrote: > Hi everybody ! > > I've got a little problem trying to get access to MySQL with a java > application. > > I use : > mysql 3.23.55 > linux-sun-jdk1.3.1.07_1 > mysql-jdbc-mm > FreeBSD 4.7-STABLE > > I got the connection with MySQL vi jdbc without problem but i can't > access the database as the user ... > I got the following from the server : > > #java.sql.SQLException: Invalid authorization specification: Access > denied for user: 'user_name@localhost.mydomain.com' (Using password: > YES) > > > The rights in MySQL sounds good because when I try to access by the > console, it's all fine. > > In the java program, I have the following code : > dbcxn = > DriverManager.getConnection("jdbc:mysql://localhost:3306/db_name?user=user_name&password=user_pwd") > > I also tryed with : > dbcxn = > DriverManager.getConnection("jdbc:mysql://localhost:3306/db_name","user_name","user_pwd"); > > Any Ideas ? > > Thanks > -- Roberto Nunnari -software engineer- mailto:nunnari@die.supsi.ch Scuola Universitaria Professionale della Svizzera Italiana Dipartimento di Informatica e Elettronica http://www.die.supsi.ch SUPSI-DIE Via Cantonale tel: +41-91-6108561 6928 Manno """ fax: +41-91-6108570 Switzerland (o o) =======================oOO==(_)==OOo======================== From owner-freebsd-database@FreeBSD.ORG Mon May 12 04:38:23 2003 Return-Path: Delivered-To: freebsd-database@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CBB5F37B401 for ; Mon, 12 May 2003 04:38:23 -0700 (PDT) Received: from mailhub7.isdnet.net (mailhub7.isdnet.net [195.154.209.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 577B943FD7 for ; Mon, 12 May 2003 04:38:22 -0700 (PDT) (envelope-from anselme@netcourrier.com) Received: from [192.168.1.113] (ppp1640-cwdsl.fr.cw.net [62.210.118.109]) by mailhub7.isdnet.net (8.9.3p2/8.9.3) with ESMTP id NAA34344; Mon, 12 May 2003 13:38:09 +0200 (CEST) From: Anselme To: Roberto Nunnari In-Reply-To: <3EBF7F73.1090502@die.supsi.ch> References: <1052736418.280.23.camel@Toto.dippgw.homedns.org> <3EBF7F73.1090502@die.supsi.ch> Content-Type: text/plain Organization: Message-Id: <1052739389.280.43.camel@Toto.dippgw.homedns.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4 Date: 12 May 2003 13:36:30 +0200 Content-Transfer-Encoding: 7bit cc: freebsd-database Subject: Re: MySQL & jdbc X-BeenThere: freebsd-database@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Database use and development under FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2003 11:38:24 -0000 On Mon, 2003-05-12 at 13:03, Roberto Nunnari wrote: > if this doesn't work: > > # mysql -u username -p yourdbname > The problem doesnot come from the rights : This works fine ! > > getConnection( "jdbc:mysql://localhost/mydbname", "myusername", "mypassword" ); > I tryed with this code, but this doesnot work better :( > regards. > > > Any Ideas ? > > > > Thanks > > -- Anselme From owner-freebsd-database@FreeBSD.ORG Mon May 12 08:59:25 2003 Return-Path: Delivered-To: freebsd-database@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB03837B401 for ; Mon, 12 May 2003 08:59:25 -0700 (PDT) Received: from misery.sdf.com (misery.sdf.com [207.200.153.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id DEEC943F3F for ; Mon, 12 May 2003 08:59:21 -0700 (PDT) (envelope-from tom@sdf.com) Received: from tom (helo=localhost) by misery.sdf.com with local-esmtp (Exim 2.12 #1) id 19FE7L-0002bI-00; Mon, 12 May 2003 07:17:27 -0700 Date: Mon, 12 May 2003 07:17:11 -0700 (PDT) From: Tom Samplonius To: Anselme In-Reply-To: <1052736418.280.23.camel@Toto.dippgw.homedns.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-database Subject: Re: MySQL & jdbc X-BeenThere: freebsd-database@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Database use and development under FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2003 15:59:25 -0000 When running mysql on the console, it will connect via a named pipe. The JDBC driver does not support named pipes, and must open a TCP/IP socket to localhost. A common problem is that the MySQL permission tables say "localhost", but 127.0.0.1 reverse resolves to "localhost.mydomain.com". Tom On 12 May 2003, Anselme wrote: > Hi everybody ! > > I've got a little problem trying to get access to MySQL with a java > application. > > I use : > mysql 3.23.55 > linux-sun-jdk1.3.1.07_1 > mysql-jdbc-mm > FreeBSD 4.7-STABLE > > I got the connection with MySQL vi jdbc without problem but i can't > access the database as the user ... > I got the following from the server : > > #java.sql.SQLException: Invalid authorization specification: Access > denied for user: 'user_name@localhost.mydomain.com' (Using password: > YES) > > > The rights in MySQL sounds good because when I try to access by the > console, it's all fine. > > In the java program, I have the following code : > dbcxn = > DriverManager.getConnection("jdbc:mysql://localhost:3306/db_name?user=user_name&password=user_pwd") > > I also tryed with : > dbcxn = > DriverManager.getConnection("jdbc:mysql://localhost:3306/db_name","user_name","user_pwd"); > > Any Ideas ? > > Thanks > > -- > Anselme > > _______________________________________________ > freebsd-database@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-database > To unsubscribe, send any mail to "freebsd-database-unsubscribe@freebsd.org" > > From owner-freebsd-database@FreeBSD.ORG Mon May 12 09:13:21 2003 Return-Path: Delivered-To: freebsd-database@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E9B8A37B401 for ; Mon, 12 May 2003 09:13:20 -0700 (PDT) Received: from mailhub10.isdnet.net (mailhub10.isdnet.net [195.154.209.131]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8776C43FB1 for ; Mon, 12 May 2003 09:13:17 -0700 (PDT) (envelope-from anselme@netcourrier.com) Received: from [192.168.1.113] (ppp1640-cwdsl.fr.cw.net [62.210.118.109]) by mailhub10.isdnet.net (8.9.3p2/8.9.3) with ESMTP id SAA45783; Mon, 12 May 2003 18:13:03 +0200 (CEST) From: Anselme To: Tom Samplonius In-Reply-To: References: Content-Type: text/plain Organization: Message-Id: <1052755886.1898.7.camel@Toto.dippgw.homedns.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4 Date: 12 May 2003 18:11:26 +0200 Content-Transfer-Encoding: 7bit cc: freebsd-database Subject: Re: MySQL & jdbc X-BeenThere: freebsd-database@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Database use and development under FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2003 16:13:21 -0000 On Mon, 2003-05-12 at 16:17, Tom Samplonius wrote: > When running mysql on the console, it will connect via a named pipe. > The JDBC driver does not support named pipes, and must open a TCP/IP > socket to localhost. > > A common problem is that the MySQL permission tables say "localhost", > but 127.0.0.1 reverse resolves to "localhost.mydomain.com". > > > Tom > > Yes, I found some things like that in my research on the web and I guess that's the point, but how can I deal with it ? Because even if in the table 'user' I put : mysql> select * from user where user="user_name" \G *************************** 1. row *************************** Host: localhost.mydomain.com User: user_name Password: 656b45b307f18ae4 Select_priv: Y Insert_priv: Y Update_priv: Y Delete_priv: Y Create_priv: N Drop_priv: N Reload_priv: N Shutdown_priv: N Process_priv: N File_priv: N Grant_priv: N References_priv: N Index_priv: N Alter_priv: N 1 row in set (0.00 sec) it doesnot work :(( (I have done the "flush privileges") ??? -- Anselme From owner-freebsd-database@FreeBSD.ORG Mon May 12 09:32:54 2003 Return-Path: Delivered-To: freebsd-database@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 30F0B37B401 for ; Mon, 12 May 2003 09:32:54 -0700 (PDT) Received: from mail.die.supsi.ch (mail.die.supsi.ch [193.5.153.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC13043F75 for ; Mon, 12 May 2003 09:32:52 -0700 (PDT) (envelope-from nunnari@die.supsi.ch) Received: from die.supsi.ch (pcm2022.die.supsi.ch [193.5.152.22]) by mail.die.supsi.ch (8.11.6/8.11.6) with ESMTP id h4CGWQY18878; Mon, 12 May 2003 18:32:26 +0200 Message-ID: <3EBFCC9A.2060209@die.supsi.ch> Date: Mon, 12 May 2003 18:32:26 +0200 From: Roberto Nunnari User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Anselme References: <1052755886.1898.7.camel@Toto.dippgw.homedns.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit cc: freebsd-database Subject: Re: MySQL & jdbc X-BeenThere: freebsd-database@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Database use and development under FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2003 16:32:54 -0000 in my /etc/hosts file I have the following lines regarding localhost: ::1 localhost localhost.my.domain 127.0.0.1 localhost localhost.my.domain and mysql> use mysql mysql> select host, user, password from user; reports:¨ +----------------+------------+------------------+ | host | user | password | +----------------+------------+------------------+ | localhost | salathe | mycryptedpassword | +----------------+------------+------------------+ 11 rows in set (0.02 sec) regards. Anselme wrote: > On Mon, 2003-05-12 at 16:17, Tom Samplonius wrote: > >> When running mysql on the console, it will connect via a named pipe. >>The JDBC driver does not support named pipes, and must open a TCP/IP >>socket to localhost. >> >> A common problem is that the MySQL permission tables say "localhost", >>but 127.0.0.1 reverse resolves to "localhost.mydomain.com". >> >> >>Tom >> >> > > Yes, I found some things like that in my research on the web and I guess > that's the point, but how can I deal with it ? Because even if in the > table 'user' I put : > > mysql> select * from user where user="user_name" \G > *************************** 1. row *************************** > Host: localhost.mydomain.com > User: user_name > Password: 656b45b307f18ae4 > Select_priv: Y > Insert_priv: Y > Update_priv: Y > Delete_priv: Y > Create_priv: N > Drop_priv: N > Reload_priv: N > Shutdown_priv: N > Process_priv: N > File_priv: N > Grant_priv: N > References_priv: N > Index_priv: N > Alter_priv: N > 1 row in set (0.00 sec) > > > it doesnot work :(( > > (I have done the "flush privileges") > > ??? -- Roberto Nunnari -software engineer- mailto:nunnari@die.supsi.ch Scuola Universitaria Professionale della Svizzera Italiana Dipartimento di Informatica e Elettronica http://www.die.supsi.ch SUPSI-DIE Via Cantonale tel: +41-91-6108561 6928 Manno """ fax: +41-91-6108570 Switzerland (o o) =======================oOO==(_)==OOo======================== From owner-freebsd-database@FreeBSD.ORG Tue May 13 00:57:19 2003 Return-Path: Delivered-To: freebsd-database@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5632137B401 for ; Tue, 13 May 2003 00:57:19 -0700 (PDT) Received: from mailhub5.isdnet.net (mailhub5.isdnet.net [195.154.209.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id BAD3743F3F for ; Tue, 13 May 2003 00:57:17 -0700 (PDT) (envelope-from anselme@netcourrier.com) Received: from [192.168.1.113] (ppp1494-cwdsl.fr.cw.net [62.210.117.217]) by mailhub5.isdnet.net (8.9.3p2/8.9.3) with ESMTP id JAA65886; Tue, 13 May 2003 09:56:56 +0200 (CEST) From: Anselme To: Roberto Nunnari In-Reply-To: <3EBFCC9A.2060209@die.supsi.ch> References: <1052755886.1898.7.camel@Toto.dippgw.homedns.org> <3EBFCC9A.2060209@die.supsi.ch> Content-Type: text/plain; charset=ISO-8859-1 Organization: Message-Id: <1052812518.268.12.camel@Toto.dippgw.homedns.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4 Date: 13 May 2003 09:55:19 +0200 Content-Transfer-Encoding: 8bit cc: freebsd-database Subject: Re: MySQL & jdbc X-BeenThere: freebsd-database@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Database use and development under FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 07:57:19 -0000 On Mon, 2003-05-12 at 18:32, Roberto Nunnari wrote: > in my /etc/hosts file I have the following lines regarding localhost: > > ::1 localhost localhost.my.domain > 127.0.0.1 localhost localhost.my.domain > ok, I had : 127.0.0.1 localhost.my.domain localhost so I tryed : 127.0.0.1 localhost localhost.mydomain and even : 127.0.0.1 localhost but it still doesnot work ... do I need to reboot or something if I want the system take in charge the new /etc/hosts ? In MySQL, everything is allright : mysql> select host, user, password from user where user='anselme' ; +-----------+-----------+------------------+ | host | user | password | +-----------+-----------+------------------+ | localhost | anselme | 656b45b307f18ae4 | +-----------+-----------+------------------+ 1 row in set (0.00 sec) > and > mysql> use mysql > mysql> select host, user, password from user; > > reports:¨ > +----------------+------------+------------------+ > | host | user | password | > +----------------+------------+------------------+ > | localhost | salathe | mycryptedpassword | > +----------------+------------+------------------+ > 11 rows in set (0.02 sec) > > > regards. > > -- Anselme From owner-freebsd-database@FreeBSD.ORG Tue May 13 01:08:20 2003 Return-Path: Delivered-To: freebsd-database@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8842A37B401 for ; Tue, 13 May 2003 01:08:20 -0700 (PDT) Received: from misery.sdf.com (misery.sdf.com [207.200.153.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id F2BB143FA3 for ; Tue, 13 May 2003 01:08:18 -0700 (PDT) (envelope-from tom@sdf.com) Received: from tom (helo=localhost) by misery.sdf.com with local-esmtp (Exim 2.12 #1) id 19FTF2-0004Z1-00; Mon, 12 May 2003 23:26:24 -0700 Date: Mon, 12 May 2003 23:26:21 -0700 (PDT) From: Tom Samplonius To: Anselme In-Reply-To: <1052812518.268.12.camel@Toto.dippgw.homedns.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-database Subject: Re: MySQL & jdbc X-BeenThere: freebsd-database@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Database use and development under FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 08:08:20 -0000 On 13 May 2003, Anselme wrote: > In MySQL, everything is allright : > > mysql> select host, user, password from user where user='anselme' ; > +-----------+-----------+------------------+ > | host | user | password | > +-----------+-----------+------------------+ > | localhost | anselme | 656b45b307f18ae4 | > +-----------+-----------+------------------+ > 1 row in set (0.00 sec) ... And "user" isn't the only access table. There is a table for hosts, and as well as databases. The MySQL permissions system is very complicated. Tom From owner-freebsd-database@FreeBSD.ORG Tue May 13 01:14:50 2003 Return-Path: Delivered-To: freebsd-database@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 15E7137B404 for ; Tue, 13 May 2003 01:14:50 -0700 (PDT) Received: from mailhub1.isdnet.net (mailhub1.isdnet.net [195.154.209.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F85243F3F for ; Tue, 13 May 2003 01:14:48 -0700 (PDT) (envelope-from anselme@netcourrier.com) Received: from [192.168.1.113] (ppp1494-cwdsl.fr.cw.net [62.210.117.217]) by mailhub1.isdnet.net (8.9.3p2/8.9.3) with ESMTP id KAA42446; Tue, 13 May 2003 10:14:40 +0200 (CEST) From: Anselme To: Tom Samplonius In-Reply-To: References: Content-Type: text/plain Organization: Message-Id: <1052813583.268.18.camel@Toto.dippgw.homedns.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4 Date: 13 May 2003 10:13:03 +0200 Content-Transfer-Encoding: 7bit cc: freebsd-database Subject: Re: MySQL & jdbc X-BeenThere: freebsd-database@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Database use and development under FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 08:14:50 -0000 On Tue, 2003-05-13 at 08:26, Tom Samplonius wrote: > > And "user" isn't the only access table. There is a table for hosts, and > as well as databases. The MySQL permissions system is very complicated. > Yes, but when I run MySQL on the console with this user and this password, I have no problem. This user has restrected access to a specific database and only on some tables from this database but it works fine ... except when I try from the java program, still get this Invalid authorization specification: Access denied for user: 'anselme@localhost.mydomaine.com' (Using password: YES) !*$?!!%! > Tom -- Anselme From owner-freebsd-database@FreeBSD.ORG Tue May 13 06:44:27 2003 Return-Path: Delivered-To: freebsd-database@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 735BB37B401 for ; Tue, 13 May 2003 06:44:27 -0700 (PDT) Received: from mailhub5.isdnet.net (mailhub5.isdnet.net [195.154.209.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 07B3643F85 for ; Tue, 13 May 2003 06:44:26 -0700 (PDT) (envelope-from anselme@netcourrier.com) Received: from [192.168.1.113] (ppp1494-cwdsl.fr.cw.net [62.210.117.217]) by mailhub5.isdnet.net (8.9.3p2/8.9.3) with ESMTP id PAA48303 for ; Tue, 13 May 2003 15:44:24 +0200 (CEST) From: Anselme To: freebsd-database In-Reply-To: <1052813583.268.18.camel@Toto.dippgw.homedns.org> References: <1052813583.268.18.camel@Toto.dippgw.homedns.org> Content-Type: text/plain Organization: Message-Id: <1052833369.268.30.camel@Toto.dippgw.homedns.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4 Date: 13 May 2003 15:42:49 +0200 Content-Transfer-Encoding: 7bit Subject: Re: MySQL & jdbc -Got it ! X-BeenThere: freebsd-database@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Database use and development under FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 13:44:27 -0000 > On Tue, 2003-05-13 at 08:26, Tom Samplonius wrote: > > > > > And "user" isn't the only access table. There is a table for hosts, and > > as well as databases. The MySQL permissions system is very complicated. > > > You were right !! I kept 127.0.0.1 localhost.mydomain.com localhost in /etc/hosts. BUT in the database mysql I've change like this : mysql> select host, user from user where user="anselme" ; +-----------------------+-----------+ | host | user | +-----------------------+-----------+ | localhost.mydomain.com | anselme | +-----------------------+-----------+ 1 row in set (0.01 sec) AND (very important) mysql> select host, user from tables_priv where user="anselme" ; +-----------------------+-----------+ | host | user | +-----------------------+-----------+ | localhost.mydomain.com| anselme | +-----------------------+-----------+ 1 rows in set (0.00 sec) Now, it works !! I don't think there is any problem doing like this ? Thank you very much everybody for your help :)) -- Anselme