Step renamed to listuser

Added charset utf8
This commit is contained in:
2021-02-19 14:45:00 +01:00
parent 41fd3d3861
commit 2295381a66

View File

@@ -55,7 +55,7 @@ step_8() {
step_10_info() { step_10_info() {
echo "Create mysql database without specific characterset [OPTIONS]" echo "Create mysql database without specific characterset [OPTIONS]"
echoinfo " [OPTIONS]" echoinfo " [OPTIONS]"
echoinfo " --charset,-c <utf8mb4> : character set and collate" echoinfo " --charset,-c <utf8|utf8mb4> : character set and collate"
echoinfo " --database, -d : database name" echoinfo " --database, -d : database name"
echoinfo " --user, -u : user name" echoinfo " --user, -u : user name"
echoinfo " Manual password entry for non existing user" echoinfo " Manual password entry for non existing user"
@@ -83,9 +83,12 @@ step_10() {
done done
case "$dbOption" in case "$dbOption" in
utf8)
dbOption="CHARACTER SET utf8 COLLATE utf8_unicode_ci";;
utf8mb4) utf8mb4)
dbOption="CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci" dbOption="CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci";;
;; *)
dbOption="";;
esac esac
if [ -z "$dbName" ] ; then if [ -z "$dbName" ] ; then
@@ -127,7 +130,7 @@ step_14() {
} }
step_16_info() { echo "List mysql user"; } step_16_info() { echo "List mysql user"; }
step_16_alias() { ALIAS="listdbuser"; } step_16_alias() { ALIAS="listuser"; }
step_16() { step_16() {
exe mysql -u root -e 'SELECT User, Host FROM mysql.user;' exe mysql -u root -e 'SELECT User, Host FROM mysql.user;'
echo -e "\nDrop dbuser by: mysql -u root -e 'DROP USER dbuser@localhost;'" echo -e "\nDrop dbuser by: mysql -u root -e 'DROP USER dbuser@localhost;'"