Databases
From Cheatsheet
MYSQL+MARIADB
# Log into the MySQL CLI mysql -u root -p # Show all tables in the database SHOW TABLES; # Exit the MySQL CLI exit
Postgres
# Log into the Postgres CLI psql # List all databases \l # Connect to a database -d mydatabase -U databaseuser –W # Switch to the new database connection \c mydatabase databaseuser # List all tables \dt # Quit the Postgres CLI \q