It seems I have been doing a lot of command line work on Debian with MySQL recently and have been having to search the internet (or my bash history) every time I need to do something. Here is a collection of commands I have been using.
I have included “variables” within {curly_brackets}
- these need to be replaced with database names/usernames/passwords (including the brackets)
The following commands are to be run in the mysql
console (e.g. sudo mysql
)
### Show all the databases
show databases;
#mysql #mysql commands