Reputation: 19
I tried using the sql-mysql mode but emacs is unable to find the file/directory mysql. However, I can access it from the terminal. How do I point mysql in emacs to /usr/local/mysql/bin/mysql ?
Upvotes: 0
Views: 1523
Reputation: 66059
Your path is probably not being correctly set for emacs sessions. You can check what paths are being searched for executables with C-h v exec-path. A simple way to solve this is to add the needed path entries in your .emacs
like so:
(add-to-list 'exec-path "/path/to/your/mysql")
Upvotes: 1
Reputation: 7951
(setq sql-mysql-program "/path/to/your/mysql")
(setq sql-user "mysql user")
(setq sql-password "password")
(setq sql-server "mysql-server")
(setq sql-mysql-options "optional command line options")
supplying some values to these variables through your .emacs
should help your situation.
Upvotes: 4
Reputation: 30248
You can customize the mysql used by SQL mode in emacs.
M-x customize-group [RET] SQL
and update the value for mysql.
Upvotes: 2