From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Frank Stutzman Newsgroups: gmane.emacs.help Subject: Re: sql-completion.el messing with sql-mysql? Date: Thu, 20 Feb 2014 16:10:42 +0000 (UTC) Organization: Nothing witty to write here Message-ID: References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1392912909 22150 80.91.229.3 (20 Feb 2014 16:15:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Feb 2014 16:15:09 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Feb 20 17:15:18 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WGWHO-0002ja-6l for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Feb 2014 17:15:18 +0100 Original-Received: from localhost ([::1]:39456 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGWHN-00018A-7v for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Feb 2014 11:15:17 -0500 Original-Path: usenet.stanford.edu!news.kjsl.com!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 40 Original-NNTP-Posting-Host: cat2.kjsl.com Original-X-Trace: news.kjsl.com 1392912642 85518 66.109.111.28 (20 Feb 2014 16:10:42 GMT) Original-X-Complaints-To: usenet@news.kjsl.com Original-NNTP-Posting-Date: Thu, 20 Feb 2014 16:10:42 +0000 (UTC) User-Agent: tin/2.2.0-20131224 ("Lochindaal") (UNIX) (FreeBSD/9.2-RELEASE-p3 (amd64)) Original-Xref: usenet.stanford.edu gnu.emacs.help:203871 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:96139 Archived-At: Chris Van Dusen wrote: > > I believe this is because sql-completion.el assumes that MySQL is running on > localhost. See the function mysql-shell-query. Thanks Chris, this looksl like the right path although mysql-shell-query is defined in mysql.el. Here is that function in entirity: ;;; query with shell command (defun mysql-shell-query (sql &optional db) (let ((cmd (mapconcat 'identity (append (append (list mysql-program) ;; -s option inhibit header in output (remove "-s" mysql-options)) (list "-u" mysql-user db (and (string< "" mysql-password) (concat "-p" mysql-password)) "-e" (format "\"%s\"" sql))) " "))) (mysql-output-table (shell-command-to-string cmd)))) Staring at this long enough has me convinced that what it is feeding to the mysql client is missing a '-h server_name' when it is needed. The server name seems to be kept in the sql-mysql-login-params variable, although I am unclear how to extract it from the other parameters. In further poking about, it seems to me that mysql.el just isn't set up to handle a remote database at all. For example, the mysql-connect fuction is also missing any reference to a server. I think fixing this is beyond my limited skills. For my needs, I am going to have to abandon the idea of have completion available for my mysql development. -- Frank Stutzman