A terminus plugin that will locally run mysql commands on your site environment's databases. This plugin was built in bash on Windows and should work in any linux environment that has mysql-cli and sftp.
Unfortunately, others beat me to these ideas so I probably wont owrk too hard on supporting this particular plugin.
For mysql connections See terminus pancakes
For the sftp connection See terminus filer
This plugin requires a local mysql-cli installation. On Ubuntu run:
sudo apt-get install mysql-cli
Otherwise, please check the interwebs for how to install mysql-cli.
Download this project and install it in your $HOME/.terminus/plugins/
folder
To open the mysql-cli connection or to pass a SQL command use the following:
$ terminus env:mysql [site].[env]
This will open the mysql interactive shell.
$ terminus env:mysql [site].[env] -- "[SQL COMMAND]"
This will run the sql command and print the output.
To open the sftp connection use the following:
terminus env:sftp [site].[env]
$ terminus help mysql
Otherwise please refer to the terminus docs.
Please report any issues here. I'll get to them as I can. Feel free to fork and make your own.
Thanks and I hope you enjoy