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.
Connect to MySQL Database
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
# Skip SSL
mysql -u <USER> -h <TARGET> -p'<PASSWORD>' --skip-ssl
Sample Output:
TO-DO
# Execute query inline
mysql -u <USER> -D <DB_NAME> -h <TARGET> -p'<PASSWORD>' -e '<QUERY>'
Sample Output:
mysql -u <USER> -D <DB_NAME> -h <TARGET> -p'<PASSWORD>' -e 'show tables;'
General
# 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
Insert Entry
INSERT INTO <TABLE_NAME> (<COLUMN_1>,<COLUMN_2>,...) VALUES (<VALUE_1>,<VALUE_2>,...);
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("<FILE>");
Sample Output:
select load_file("/etc/passwd");