0

When I run sql-mysql, it gives me an unusable console: enter image description here

Note how the commands and results are misplaced. My emacs version is 24.5.1.

  • Does this happen when you start with emacs -Q? – Scott Weldon May 22 '15 at 19:44
  • Yep, it happens – Jesse May 22 '15 at 19:50
  • I think this might be documented with a couple of fixes floating around. Check out the Miscellaneous Settings section here: emacswiki.org/emacs/SqlMode – Cody Reichert May 23 '15 at 15:21
0

Turns out the problem is an incompatibility with the MariaDB console. You need to change the mysql regex stored in sql-product-alist variable to \\(?:mysql\\|mariadb\\).*> to make it compatible with MariaDB.

(I'm not experienced with elisp and couldn't write a command to do that automatically, so instead I just overrode the variable in my init.el. If anyone knows a practical command for that please let me know.)

  • (defun sqli-add-hooks () "My hooks for sql-interactive-mode" (sql-set-product-feature 'mysql :prompt-regexp "^\(?:mysql\\|mariadb\).*> ")) (add-hook 'sql-interactive-mode-hook 'sqli-add-hooks) – Hut8 Sep 20 '15 at 20:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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