BACKUP_DATE_TIME="$(date +'%Y%m%d-T%H%M')-Z$(date +'%z'|tr '+-' 'PM')"
echo -n password: ;read -s MYSQL_PWD;export MYSQL_PWD; echo
# password: sadaqah!
mysql -h127.0.0.1 -P3306 -uchorke -Dchorke_orgwiki
mysqldump -h127.0.0.1 -P3306 -uchorke chorke_orgwiki > ./chorke_orgwiki-${BACKUP_DATE_TIME}.dump
mysql -h127.0.0.1 -P3306 -uchorke -Dchorke_orgwiki < chorke_orgwiki-20241010-T1010-ZP0600.dump
curl -fsSL https://repo.mysql.com/RPM-GPG-KEY-mysql-2023\
| sudo tee /etc/apt/keyrings/mysql.asc >/dev/null
DISTRIBUTION=$(. /etc/os-release && echo "${VERSION_CODENAME}");\
cat << SRC | sudo tee /etc/apt/sources.list.d/mysql.list >/dev/null
deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/mysql.asc] http://repo.mysql.com/apt/ubuntu/ ${DISTRIBUTION} mysql-tools
deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/mysql.asc] http://repo.mysql.com/apt/ubuntu/ ${DISTRIBUTION} mysql-8.4-lts
deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/mysql.asc] http://repo.mysql.com/apt/ubuntu/ ${DISTRIBUTION} mysql-apt-config
SRC
echo 'apt-get update;echo;apt-get install -y mysql-server'|sudo bash
wget -cq https://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-workbench-community_8.0.40-1ubuntu24.04_amd64.deb -P ${HOME}/Downloads
sudo dpkg -i ${HOME}/Downloads/mysql-workbench-community_8.0.40-1ubuntu24.04_amd64.deb
rm -rf ${HOME}/Downloads/mysql-workbench-community_8.0.40-1ubuntu24.04_amd64.deb
sudo apt-get --fix-broken install
sudo apt-get -f install
sudo apt remove mysql-workbench-community
sudo apt autoremove