mysql - add status and refactor setup step

This commit is contained in:
2022-12-19 22:29:36 +01:00
parent 2e598b01c9
commit e032c925db

View File

@@ -9,25 +9,38 @@ dbUser=
dbRemote=localhost
dbPass=
step_1_info() {
step_1_info() { echo "Status"; }
step_1_alias() { echo "status"; }
step_1() {
exe apt policy mariadb-server
}
step_5_info() { echo "Setup ubuntu $databaseName repository"; }
step_5_alias() { echo "setup"; }
step_5() {
exe apt install curl
exep "curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash -s -- --skip-maxscale --skip-tools"
}
step_6_info() {
echo "Installation of ${databaseName} packages:"
echoinfo "$databasePackages"
echoinfo "(Consider step \"latest\" first to setup official repository with the latest version)"
echoinfo "(Consider step \"setup\" first)"
}
step_1_alias() { echo install; }
step_1() {
step_6_alias() { echo install; }
step_6() {
exe apt update
exe apt install $databasePackages
endReturn -o $? "Error instaling $databaseName"
}
step_2_info() { echo "Secure ${databaseName} installation"; }
step_2() {
step_7_info() { echo "Secure ${databaseName} installation"; }
step_7() {
exe mysql_secure_installation
}
step_3_info() { echo "${databaseName} configuration"; }
step_3() {
step_8_info() { echo "${databaseName} configuration"; }
step_8() {
addConf -c "$mariadbConfig" "$mariadbConfigLoc"
echo -n "Restarting mysql ... "
@@ -46,13 +59,6 @@ table_definition_cache=1400
#innodb_force_recovery=6"
step_8_info() { echo "Setup ubuntu $databaseName repository"; }
step_8_alias() { echo "latest"; }
step_8() {
exe apt install curl
exep "curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash -s -- --skip-maxscale --skip-tools"
}
step_10_info() {
echo "Create mysql database without specific characterset"
echoinfo " [OPTIONS]"