First, include the code from the accepted answer on How can I get the sql mode of emacs to use the mysql configuration file (.my.cnf)? in your .emacs
Second, use Cx ' from the SQL code block to send the code block to the SQL mode buffer
Once a block of code has been sent to the buffer in SQL mode, start a MySQL session using Mx pool-a (or any other connection you want to use).
At this point, you can use standard SQL bindings:
Cc Cc send paragraph Cc Cr send selected region Cc Cb send entire buffer Cc Cs send string
Abe
source share