set -x
R=/home/user/glarkresult
mkdir -p $R/{sql,src,conf,creds,logs}
echo '== mysqldump glarkru =='
mysqldump -uglarkru -p'7Q4j4Y4qQ6c4B4h8P1n3N9p8' --routines --triggers --events --databases glarkru 2>/dev/null | gzip > $R/sql/glarkru_full.sql.gz && ls -la $R/sql/
echo '== table list =='
mysql -uglarkru -p'7Q4j4Y4qQ6c4B4h8P1n3N9p8' glarkru -e "SHOW TABLES;" 2>/dev/null > $R/sql/tables_list.txt && cat $R/sql/tables_list.txt | head -60
