Howard Abrams is continuing his Literate Devops series with a great post on Literate Databse Work. He takes the ideas he developed in his Literate Devops post and applies them to investigating some problems with MySQL.
This time, he handles communication with the remote host by using SSH port redirection to make it appear that the MySQL server is on his local machine. Then he can use Org mode code blocks marked SQL to experiment with the database and put the results right in his Org file.
This is a really nice technique and one I wish I’d known when I was still grappling with databases. It much easier than logging into the actual server to do your work and you have a record of what you did and the results.
That last part is non-trivial because as Abrams says, you can pass those results to your team members by simply emailing them the Org file or by exporting them to HTML and posting them on a community Web server. Take a look at his post and see what he did and how he did it. If you work with SQL you may find it has some ideas you can use.