Usage Tips:
- Click on a keyword to enable inline editing.
- Click inside a code block to copy (excludes comments).
- Use the button to view examples.
- Click outside to collapse all examples.
General
Connect to mysql Database
# Database unknown
mysql -u <USER> -h <TARGET> -p'<PASSWORD>'
Sample Output:
TO-DO
# Database known
mysql -u <USER> -D <DB_NAME> -h <TARGET> -p'<PASSWORD>'
Sample Output:
TO-DO
# Execute query inline
mysql -u <USER> -D <DB_NAME> -h <TARGET> -p'<PASSWORD>' -e 'show tables;'
Sample Output:
TO-DO
Basic Commands
# Show all databases
show databases;
Sample Output:
TO-DO
# Choose database
use <DB_NAME>;
Sample Output:
TO-DO
# Show all tables
show tables;
Sample Output:
TO-DO
# Show all entries in table_name
select * from <TABLE_NAME>;
Sample Output:
TO-DO
Update Entry
# Update Entry Example
UPDATE users set user_type='Administrator' where email='test@example.com';
Sample Output:
TO-DO
Arbitrary File Read
select load_file("/etc/passwd");
Sample Output:
TO-DO