# List databases
\l
\list
# Connect to a database
\c <database>
# List tables
\dt
# Basic query
SELECT * FROM <table-name>;
MySQL
Connect to MySQL.
mysql -h localhost -P 3306 -u root -p
Common commands.
# List databases
SHOW DATABASES;
# Connect to a database
USE <database>;
# List tables
SHOW TABLES;
# Basic query
SELECT * FROM <table-name>;
Oracle
Connect to Oracle.
You can install the oracle client and configure it locally on your Kali machine, but it's easier to just connect to the container and work locally there.
# Connect to your container
sudo docker ps -a
sudo docker exec -it <container-id> bash
sqlplus system/oracle@localhost:1521/xe
Common commands.
# List tables
SELECT table_name FROM user_tables;
# Basic query
SELECT * FROM table_name;