如何使用emacs和mysql [英] How to work with emacs and mysql

查看:177
本文介绍了如何使用emacs和mysql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在Emacs中进入sql模式时,我收到消息无法找到SQL程序'mysql'。但是,我可以通过终端访问mysql。

I'm getting the message unable to locate SQL program 'mysql' when I attempt to enter sql mode in Emacs. However, I'm able to access mysql just fine via terminal.

对于记录,我使用用户和密码作为root,服务器作为localhost和数据库我选择

For the record, I'm using user and password as root, server as localhost and a database of my choosing. I just don't know why this is happening.

想法?

推荐答案

Emacs使用 exec-path 变量中列出的目录来查找程序。你可以这样添加:

Emacs uses the directories listed in the exec-path variable to look for programs. You can add to it like so:

(add-to-list 'exec-path "/usr/local/bin")

以下shell命令应该给你使用正确的值:

The following shell command should give you the correct value to use:

dirname `which mysql`

这篇关于如何使用emacs和mysql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆