Emacs has a built-in Mx sql-mysql mode.
You will be prompted for your username, password, schema name (or database name) and server name.
From now on, when you open the .sql file, emacs should link this .sql file to the SQL buffer associated with the MySQL session.
Inside this mode, you can get help with the “Control-H m” key.
There is a family of emacs sqac modes. They all pretty much work the same way.
source
share