Found my original ticket! And yes, I truncated a few production tables :(
ssh -fNg -L 3306:my-secure-db.com:3306 [email protected]Tedium in a GUI is still tedium.
With a GUI, you can click 3 times and browse 3 tables. That's just not possible without a GUI.
If GUIs didn't save people (lots of) time, no one would have invented them and the software industry would be moving away from them.
Besides being way faster and more efficient, GUIs do things that CLIs don't:
- linting/error-checking/autocomplete for SQL
- checking query sanity (warn before an unconstrained DELETE for example)
- copy/paste data (within the database and between applications)
- jump from FK cell to the row it references
The list goes on.
- they can be stored in a version control system
- your coworkers can run them at their dev environment
- they can be used for automatic deployment
- you can test it in a dev environment before running at a production server. With GUI tools you have to remember and repeat exact steps you did before
- You can review the script or ask someone to look at it
I think GUI tools might be good for browsing and exploring database but not for making changes.
Here is a command that forwards all traffic to localhost:3306 across the ssh tunnel to example.com:3306 (the mysql default port).
I would never run a DB admin application on the live server because it's just one more piece that might open a security hole.