0

Been trying to follow this guide to setting up SQLi

http://truongtx.me/2014/08/23/setup-emacs-as-an-sql-database-client/

I use Customize Group SQL to set the parameters (host, username, etc.,) and that seems to go fine. I choose the MySQL product, also fine. Then I attempt to start the SQLi session and I get a new buffer with SQL as the name and SQLi[MySQL]:no process in the modeline.

The buffer says: 'emacs': I need something more specific.

Am I doing something wrong?

  • Are you able to access MySQL via the MySQL command line? Then are you able to access MySQL from Emacs by just doing M-x sql-mysql, and insert the user, password, database & server? – Nsukami _ Jan 8 '15 at 18:07
  • I am able to connect via command line. Can't seem to format properly in this textarea using markdown. I can't connect using the sql-mysql. Has the same error. – emlprime Jan 8 '15 at 19:12
  • What OS are you on? For example on Windows I need to customize sql-mysql-options. – glucas Jan 8 '15 at 19:28
  • I'm on OSX (Yosemite 10.10.1). I've gotten this to work on Maverick, but not Yosemite. My emacs version is GNU Emacs 24.4.51.1 (x86_64-apple-darwin14.0.0, NS apple-appkit-1343.16) of 2014-12-11. I'll look at sql-mysql-options – emlprime Jan 8 '15 at 21:40
  • Interestingly it works from within emacs in a term shell, but not in an eshell. In an eshell it gives me the same error. When I start the eshell I get a bunch of lines of "tput: unknown terminal "emacs"" Maybe that's what it's complaining about. – emlprime Jan 8 '15 at 22:08
1

I found out that neither root nor my own username works. This is not a bug; it's a (well hidden!) mysql feature.

So I added a new user in mysql with all root privileges, but with a different name from root.

However, that alone didn't fix the problem for me because I also had some code in my init file which called a mysql buffer.

To find and remove that problematic code, I commented out everything in my init file and then uncommented parts of it until I found the problem.

  • sorry: "mysql-part" == "mysql-part of .emacs" (the emacs - startfile) Good luck! Jo – user18105 Jan 7 '18 at 0:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.