From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: rb Newsgroups: gmane.emacs.help Subject: Re: sql-mode password display Date: 03 Mar 2005 18:15:29 -0500 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1109893757 31122 80.91.229.2 (3 Mar 2005 23:49:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 3 Mar 2005 23:49:17 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 04 00:49:17 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D703e-0000Se-00 for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Mar 2005 00:48:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D70Mh-0006Kk-0k for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Mar 2005 19:08:23 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D70Eq-0003Fo-UI for help-gnu-emacs@gnu.org; Thu, 03 Mar 2005 19:00:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D70Em-0003DP-02 for help-gnu-emacs@gnu.org; Thu, 03 Mar 2005 19:00:13 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D70El-0003AL-AO for help-gnu-emacs@gnu.org; Thu, 03 Mar 2005 19:00:11 -0500 Original-Received: from [166.84.1.74] (helo=mail3.panix.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D6zXW-0004O4-7X for help-gnu-emacs@gnu.org; Thu, 03 Mar 2005 18:15:30 -0500 Original-Received: from panix5.panix.com (panix5.panix.com [166.84.1.5]) by mail3.panix.com (Postfix) with ESMTP id 9AB2B981B5; Thu, 3 Mar 2005 18:15:29 -0500 (EST) Original-Received: (from rb@localhost) by panix5.panix.com (8.11.6p3/8.8.8/PanixN1.1) id j23NFTe11706; Thu, 3 Mar 2005 18:15:29 -0500 (EST) Original-To: Michael Mauger In-Reply-To: Original-Lines: 75 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-MailScanner-To: geh-help-gnu-emacs@m.gmane.org Xref: main.gmane.org gmane.emacs.help:24499 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:24499 Michael Mauger writes: > rb writes: > > > > When I use sql mode: > > > > I'm the current maintainer of sql-mode. I'll assume that you are using > the latest version of sql.el (available at http://savannah.gnu.org/cgi- > bin/viewcvs/emacs/emacs/lisp/progmodes/sql.el). Prior versions were > similar so most of this will apply. I'm not sure of the version I have been using, it's byte-compiled as part of my emacs distribution, but I downloaded the latest version per your indications, and the problems persist. [...] > The alternative is to use the `--password' (or `-p') option without a > value and allow `mysql' to prompt you for it. The current version > omits the `--password' option entirely if `sql-password' is an empty > string. > > Take a look at the function `sql-connect-mysql' (or `sql-mysql' in > older versions). There is a chunk of code like this: > > (if (not (string= "" sql-password)) > (setq params (append (list (concat "--password=" sql-password)) params))) > > Try changing it to: > > (if (not (string= "" sql-password)) > (setq params (append (list (concat "--password=" sql-password)) params)) > (setq params (append '("--password") params))) > > and remove your sql-password customization. You will now be required > to enter your password each time you start sql-mysql. I modified the code per your instructions, but one thing which I may have failed to make clear in my previous post is that I do (already) enter the password each time I connect. I do not have the password stored in my .emacs or any other location, and I don't have that variable set normally. I also may have not made clear that the password shows up in the Customization buffer (or that varaiable is set) only once I have started an sql-mysql session. > I don't use mysql at all so I'm not sure if this is globally > appropriate. Is it possible to connect to mysql without a password at > all? Do we need to distinguish between prompt me for a password and > there is no password? It is possible to set mysql to accept connections without a password, but it seems worse to allow universal access to the mysql server than to allow for the possiblilty that someone could find my password. [...] > If you modify sql.el as described above, sql-interactive-mode should > capture the password prompt and ask for your password in the minibuffer. As I mentioned, that's how I do connect now. [...] > I hope this helps. Let me know how it turns out. If you have any other > suggestions concerning mysql support please send them along. Thank you very much for your help. As I said in my first post, I find the sql mode and the interactive sql connection to be very, very useful, so thank you for that. rb --