all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Frank Stutzman <stutzman@cat2.kjsl.com>
To: help-gnu-emacs@gnu.org
Subject: Re: sql-completion.el messing with sql-mysql?
Date: Thu, 20 Feb 2014 16:10:42 +0000 (UTC)	[thread overview]
Message-ID: <le59e2$2jge$1@news.kjsl.com> (raw)
In-Reply-To: mailman.15610.1392894407.10748.help-gnu-emacs@gnu.org

Chris Van Dusen <cavandusen@gmail.com> 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




      parent reply	other threads:[~2014-02-20 16:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-19 23:47 sql-completion.el messing with sql-mysql? Frank Stutzman
2014-02-20 11:06 ` Chris Van Dusen
     [not found] ` <mailman.15610.1392894407.10748.help-gnu-emacs@gnu.org>
2014-02-20 16:10   ` Frank Stutzman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='le59e2$2jge$1@news.kjsl.com' \
    --to=stutzman@cat2.kjsl.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.