create_database.sh: support full UTF-8 support (utf8mb4).
This commit is contained in:
parent
65038c3b9a
commit
6849cf5c72
@ -627,15 +627,25 @@ if [[ "$_result" = "$DATABASE_NAME" ]] ; then
|
||||
fatal "Database '$DATABASE_NAME' already exists"
|
||||
fi
|
||||
|
||||
echononl " Create database \033[1m$DATABASE_NAME\033[m"
|
||||
echononl " Create database \033[1m$DATABASE_NAME\033[m (full UTF-8 support - utf8mb4)"
|
||||
mysql $MYSQL_CREDENTIAL_ARGS -N -s -e \
|
||||
"CREATE DATABASE $DATABASE_NAME CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci" > $tmp_log_file 2>&1
|
||||
if [[ $? -ne 0 ]] ; then
|
||||
echo_failed
|
||||
error "$(cat $tmp_log_file)"
|
||||
echononl " Create database \033[1m$DATABASE_NAME\033[m (UTF-8 support - utf8)"
|
||||
mysql $MYSQL_CREDENTIAL_ARGS -N -s -e \
|
||||
"CREATE DATABASE $DATABASE_NAME CHARACTER SET utf8 COLLATE utf8_general_ci" > $tmp_log_file 2>&1
|
||||
|
||||
if [[ $? -ne 0 ]] ; then
|
||||
echo_failed
|
||||
fatal "$(cat $tmp_log_file)"
|
||||
else
|
||||
echo_ok
|
||||
fi
|
||||
else
|
||||
echo_ok
|
||||
fi
|
||||
|
||||
#if [[ "$MYSQL_CUR_DISTRIBUTION" = "MariaDB" ]] ; then
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user