Add suport for MariaDB 10.4. Compile with default charset utf8.
This commit is contained in:
parent
e09a181e77
commit
ccb69889e7
@ -37,6 +37,28 @@ socket = /tmp/mysql.sock
|
|||||||
#autocommit = 0
|
#autocommit = 0
|
||||||
|
|
||||||
|
|
||||||
|
## - character-set-server
|
||||||
|
## -
|
||||||
|
## - The servers default character set. If you set this variable, you should also
|
||||||
|
## - set collation_server to specify the collation for the character set.
|
||||||
|
## -
|
||||||
|
## - See also: https://dev.mysql.com/doc/refman/8.0/en/charset-configuration.html
|
||||||
|
## -
|
||||||
|
## - The default depend on cmake options:
|
||||||
|
## -
|
||||||
|
## - cmake . \
|
||||||
|
## - ...
|
||||||
|
## - -DDEFAULT_CHARSET=latin1 \
|
||||||
|
## - -DDEFAULT_COLLATION=latin1_german1_ci
|
||||||
|
## -
|
||||||
|
#character-set-server = utf8
|
||||||
|
|
||||||
|
## - collation-server
|
||||||
|
## -
|
||||||
|
## - The server's default collation. See Section 10.14, “Character Set Configuration”.
|
||||||
|
#collation-server = utf8_general_ci
|
||||||
|
|
||||||
|
|
||||||
## - sql_mode
|
## - sql_mode
|
||||||
## -
|
## -
|
||||||
## - To be compartible with older programming on mysql 5.6
|
## - To be compartible with older programming on mysql 5.6
|
||||||
|
@ -35,6 +35,28 @@ innodb-open-files = 1048576
|
|||||||
port = 3306
|
port = 3306
|
||||||
socket = /tmp/mysql.sock
|
socket = /tmp/mysql.sock
|
||||||
|
|
||||||
|
|
||||||
|
## - character-set-server
|
||||||
|
## -
|
||||||
|
## - The servers default character set. If you set this variable, you should also
|
||||||
|
## - set collation_server to specify the collation for the character set.
|
||||||
|
## -
|
||||||
|
## - See also: https://dev.mysql.com/doc/refman/8.0/en/charset-configuration.html
|
||||||
|
## -
|
||||||
|
## - The default depend on cmake options:
|
||||||
|
## -
|
||||||
|
## - cmake . \
|
||||||
|
## - ...
|
||||||
|
## - -DDEFAULT_CHARSET=latin1 \
|
||||||
|
## - -DDEFAULT_COLLATION=latin1_german1_ci
|
||||||
|
## -
|
||||||
|
#character-set-server = utf8
|
||||||
|
|
||||||
|
## - collation-server
|
||||||
|
## -
|
||||||
|
## - The server's default collation. See Section 10.14, “Character Set Configuration”.
|
||||||
|
#collation-server = utf8_general_ci
|
||||||
|
|
||||||
## - sql_mode
|
## - sql_mode
|
||||||
## -
|
## -
|
||||||
## - Since Version 8.0.11 NO_AUTO_CREATE_USER is no longer available
|
## - Since Version 8.0.11 NO_AUTO_CREATE_USER is no longer available
|
||||||
|
@ -35,6 +35,29 @@ innodb-open-files = 1048576
|
|||||||
port = 3306
|
port = 3306
|
||||||
socket = /tmp/mysql.sock
|
socket = /tmp/mysql.sock
|
||||||
|
|
||||||
|
|
||||||
|
## - character-set-server
|
||||||
|
## -
|
||||||
|
## - The servers default character set. If you set this variable, you should also
|
||||||
|
## - set collation_server to specify the collation for the character set.
|
||||||
|
## -
|
||||||
|
## - See also: https://dev.mysql.com/doc/refman/8.0/en/charset-configuration.html
|
||||||
|
## -
|
||||||
|
## - The default depend on cmake options:
|
||||||
|
## -
|
||||||
|
## - cmake . \
|
||||||
|
## - ...
|
||||||
|
## - -DDEFAULT_CHARSET=latin1 \
|
||||||
|
## - -DDEFAULT_COLLATION=latin1_german1_ci
|
||||||
|
## -
|
||||||
|
#character-set-server = utf8
|
||||||
|
|
||||||
|
## - collation-server
|
||||||
|
## -
|
||||||
|
## - The server's default collation. See Section 10.14, “Character Set Configuration”.
|
||||||
|
#collation-server = utf8_general_ci
|
||||||
|
|
||||||
|
|
||||||
## - sql_mode
|
## - sql_mode
|
||||||
## -
|
## -
|
||||||
## - Since Version 8.0.11 NO_AUTO_CREATE_USER is no longer available
|
## - Since Version 8.0.11 NO_AUTO_CREATE_USER is no longer available
|
||||||
|
@ -36,6 +36,28 @@ port = 3306
|
|||||||
socket = /tmp/mysql.sock
|
socket = /tmp/mysql.sock
|
||||||
|
|
||||||
|
|
||||||
|
## - character-set-server
|
||||||
|
## -
|
||||||
|
## - The servers default character set. If you set this variable, you should also
|
||||||
|
## - set collation_server to specify the collation for the character set.
|
||||||
|
## -
|
||||||
|
## - See also: https://dev.mysql.com/doc/refman/8.0/en/charset-configuration.html
|
||||||
|
## -
|
||||||
|
## - The default depend on cmake options:
|
||||||
|
## -
|
||||||
|
## - cmake . \
|
||||||
|
## - ...
|
||||||
|
## - -DDEFAULT_CHARSET=latin1 \
|
||||||
|
## - -DDEFAULT_COLLATION=latin1_german1_ci
|
||||||
|
## -
|
||||||
|
#character-set-server = utf8
|
||||||
|
|
||||||
|
## - collation-server
|
||||||
|
## -
|
||||||
|
## - The server's default collation. See Section 10.14, “Character Set Configuration”.
|
||||||
|
#collation-server = utf8_general_ci
|
||||||
|
|
||||||
|
|
||||||
## - sql_mode
|
## - sql_mode
|
||||||
## -
|
## -
|
||||||
## - To be compartible with older programming on mysql 5.6
|
## - To be compartible with older programming on mysql 5.6
|
||||||
|
@ -35,6 +35,29 @@ innodb-open-files = 1048576
|
|||||||
port = 3306
|
port = 3306
|
||||||
socket = /tmp/mysql.sock
|
socket = /tmp/mysql.sock
|
||||||
|
|
||||||
|
|
||||||
|
## - character-set-server
|
||||||
|
## -
|
||||||
|
## - The servers default character set. If you set this variable, you should also
|
||||||
|
## - set collation_server to specify the collation for the character set.
|
||||||
|
## -
|
||||||
|
## - See also: https://dev.mysql.com/doc/refman/8.0/en/charset-configuration.html
|
||||||
|
## -
|
||||||
|
## - The default depend on cmake options:
|
||||||
|
## -
|
||||||
|
## - cmake . \
|
||||||
|
## - ...
|
||||||
|
## - -DDEFAULT_CHARSET=latin1 \
|
||||||
|
## - -DDEFAULT_COLLATION=latin1_german1_ci
|
||||||
|
## -
|
||||||
|
#character-set-server = utf8
|
||||||
|
|
||||||
|
## - collation-server
|
||||||
|
## -
|
||||||
|
## - The server's default collation. See Section 10.14, “Character Set Configuration”.
|
||||||
|
#collation-server = utf8_general_ci
|
||||||
|
|
||||||
|
|
||||||
## - sql_mode
|
## - sql_mode
|
||||||
## -
|
## -
|
||||||
## - Since Version 8.0.11 NO_AUTO_CREATE_USER is no longer available
|
## - Since Version 8.0.11 NO_AUTO_CREATE_USER is no longer available
|
||||||
|
@ -37,6 +37,28 @@ socket = /tmp/mysql.sock
|
|||||||
#autocommit = 0
|
#autocommit = 0
|
||||||
|
|
||||||
|
|
||||||
|
## - character-set-server
|
||||||
|
## -
|
||||||
|
## - The servers default character set. If you set this variable, you should also
|
||||||
|
## - set collation_server to specify the collation for the character set.
|
||||||
|
## -
|
||||||
|
## - See also: https://dev.mysql.com/doc/refman/8.0/en/charset-configuration.html
|
||||||
|
## -
|
||||||
|
## - The default depend on cmake options:
|
||||||
|
## -
|
||||||
|
## - cmake . \
|
||||||
|
## - ...
|
||||||
|
## - -DDEFAULT_CHARSET=latin1 \
|
||||||
|
## - -DDEFAULT_COLLATION=latin1_german1_ci
|
||||||
|
## -
|
||||||
|
#character-set-server = utf8
|
||||||
|
|
||||||
|
## - collation-server
|
||||||
|
## -
|
||||||
|
## - The server's default collation. See Section 10.14, “Character Set Configuration”.
|
||||||
|
#collation-server = utf8_general_ci
|
||||||
|
|
||||||
|
|
||||||
## - sql_mode
|
## - sql_mode
|
||||||
## -
|
## -
|
||||||
## - To be compartible with older programming on mysql 5.6
|
## - To be compartible with older programming on mysql 5.6
|
||||||
|
@ -8,6 +8,29 @@
|
|||||||
## -
|
## -
|
||||||
[mysqld]
|
[mysqld]
|
||||||
|
|
||||||
|
|
||||||
|
## - character-set-server
|
||||||
|
## -
|
||||||
|
## - The servers default character set. If you set this variable, you should also
|
||||||
|
## - set collation_server to specify the collation for the character set.
|
||||||
|
## -
|
||||||
|
## - See also: https://dev.mysql.com/doc/refman/8.0/en/charset-configuration.html
|
||||||
|
## -
|
||||||
|
## - The default depend on cmake options:
|
||||||
|
## -
|
||||||
|
## - cmake . \
|
||||||
|
## - ...
|
||||||
|
## - -DDEFAULT_CHARSET=latin1 \
|
||||||
|
## - -DDEFAULT_COLLATION=latin1_german1_ci
|
||||||
|
## -
|
||||||
|
#character-set-server = utf8
|
||||||
|
|
||||||
|
## - collation-server
|
||||||
|
## -
|
||||||
|
## - The server's default collation. See Section 10.14, “Character Set Configuration”.
|
||||||
|
#collation-server = utf8_general_ci
|
||||||
|
|
||||||
|
|
||||||
log-error = /var/log/mysql/error.log
|
log-error = /var/log/mysql/error.log
|
||||||
|
|
||||||
|
|
||||||
|
131
install_mysql.sh
131
install_mysql.sh
@ -2114,7 +2114,9 @@ if [[ "$MYSQL_DISTRIBUTION" = "MariaDB" ]]; then
|
|||||||
-DMYSQL_DATADIR=$MYSQL_DATA_DIR
|
-DMYSQL_DATADIR=$MYSQL_DATA_DIR
|
||||||
-DENABLED_LOCAL_INFILE=ON
|
-DENABLED_LOCAL_INFILE=ON
|
||||||
-DGRN_LOG_PATH=$mariadb_groonga_log
|
-DGRN_LOG_PATH=$mariadb_groonga_log
|
||||||
-DCONC_WITH_MYSQLCOMPAT=ON"
|
-DCONC_WITH_MYSQLCOMPAT=ON
|
||||||
|
-DDEFAULT_CHARSET=utf8
|
||||||
|
-DDEFAULT_COLLATION=utf8_general_ci"
|
||||||
|
|
||||||
if $INSTALL_SYSTEMD_SERVICE ; then
|
if $INSTALL_SYSTEMD_SERVICE ; then
|
||||||
cmake_options="$cmake_options
|
cmake_options="$cmake_options
|
||||||
@ -2140,7 +2142,8 @@ else
|
|||||||
-DENABLED_LOCAL_INFILE=1
|
-DENABLED_LOCAL_INFILE=1
|
||||||
-DDOWNLOAD_BOOST=1
|
-DDOWNLOAD_BOOST=1
|
||||||
-DWITH_BOOST=$MYSQL_INSTALL_DIR
|
-DWITH_BOOST=$MYSQL_INSTALL_DIR
|
||||||
|
-DDEFAULT_CHARSET=utf8
|
||||||
|
-DDEFAULT_COLLATION=utf8_general_ci
|
||||||
"
|
"
|
||||||
|
|
||||||
if $INSTALL_SYSTEMD_SERVICE ; then
|
if $INSTALL_SYSTEMD_SERVICE ; then
|
||||||
@ -2919,6 +2922,28 @@ innodb-open-files = $(ulimit -Hn)
|
|||||||
port = $MYSQL_PORT
|
port = $MYSQL_PORT
|
||||||
socket = $MYSQL_UNIX_SOCKET
|
socket = $MYSQL_UNIX_SOCKET
|
||||||
|
|
||||||
|
|
||||||
|
## - character-set-server
|
||||||
|
## -
|
||||||
|
## - The servers default character set. If you set this variable, you should also
|
||||||
|
## - set collation_server to specify the collation for the character set.
|
||||||
|
## -
|
||||||
|
## - See also: https://dev.mysql.com/doc/refman/8.0/en/charset-configuration.html
|
||||||
|
## -
|
||||||
|
## - The default depend on cmake options:
|
||||||
|
## -
|
||||||
|
## - cmake . \
|
||||||
|
## - ...
|
||||||
|
## - -DDEFAULT_CHARSET=latin1 \
|
||||||
|
## - -DDEFAULT_COLLATION=latin1_german1_ci
|
||||||
|
## -
|
||||||
|
#character-set-server = utf8
|
||||||
|
|
||||||
|
## - collation-server
|
||||||
|
## -
|
||||||
|
## - The server's default collation. See Section 10.14, “Character Set Configuration”.
|
||||||
|
#collation-server = utf8_general_ci
|
||||||
|
|
||||||
" >> ${logdir}/main.log
|
" >> ${logdir}/main.log
|
||||||
|
|
||||||
if [[ "$MYSQL_MAJOR_VERSION" -gt 8 ]] \
|
if [[ "$MYSQL_MAJOR_VERSION" -gt 8 ]] \
|
||||||
@ -3843,6 +3868,28 @@ innodb-open-files = $(ulimit -Hn)
|
|||||||
port = $MYSQL_PORT
|
port = $MYSQL_PORT
|
||||||
socket = $MYSQL_UNIX_SOCKET
|
socket = $MYSQL_UNIX_SOCKET
|
||||||
|
|
||||||
|
|
||||||
|
## - character-set-server
|
||||||
|
## -
|
||||||
|
## - The servers default character set. If you set this variable, you should also
|
||||||
|
## - set collation_server to specify the collation for the character set.
|
||||||
|
## -
|
||||||
|
## - See also: https://dev.mysql.com/doc/refman/8.0/en/charset-configuration.html
|
||||||
|
## -
|
||||||
|
## - The default depend on cmake options:
|
||||||
|
## -
|
||||||
|
## - cmake . \
|
||||||
|
## - ...
|
||||||
|
## - -DDEFAULT_CHARSET=latin1 \
|
||||||
|
## - -DDEFAULT_COLLATION=latin1_german1_ci
|
||||||
|
## -
|
||||||
|
#character-set-server = utf8
|
||||||
|
|
||||||
|
## - collation-server
|
||||||
|
## -
|
||||||
|
## - The server's default collation. See Section 10.14, “Character Set Configuration”.
|
||||||
|
#collation-server = utf8_general_ci
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
if [[ "$MYSQL_MAJOR_VERSION" -gt 8 ]] \
|
if [[ "$MYSQL_MAJOR_VERSION" -gt 8 ]] \
|
||||||
|| ( [[ "$MYSQL_MAJOR_VERSION" -eq 8 ]] && [[ "$MYSQL_MINOR_VERSION" -gt 0 ]] ) \
|
|| ( [[ "$MYSQL_MAJOR_VERSION" -eq 8 ]] && [[ "$MYSQL_MINOR_VERSION" -gt 0 ]] ) \
|
||||||
@ -5299,6 +5346,58 @@ if ! $UPDATE_MYSQL ; then
|
|||||||
## - Set root password
|
## - Set root password
|
||||||
## -
|
## -
|
||||||
if [[ "$MYSQL_DISTRIBUTION" = "MariaDB" ]] \
|
if [[ "$MYSQL_DISTRIBUTION" = "MariaDB" ]] \
|
||||||
|
&& [[ $MYSQL_MINOR_VERSION -ge 4 ]] ; then
|
||||||
|
|
||||||
|
echononl "Setze root Passwort für den MySQL Zugang"
|
||||||
|
|
||||||
|
echo "" >> ${logdir}/main.log
|
||||||
|
echo "## - Setze root Passwort für den MariaDB Zugang" >> ${logdir}/main.log
|
||||||
|
echo "## -" >> ${logdir}/main.log
|
||||||
|
echo "${MYSQL_INSTALL_DIR}/bin/mysql -S $MYSQL_UNIX_SOCKET -uroot mysql -N -s -e \"ALTER USER root@localhost IDENTIFIED VIA mysql_native_password USING PASSWORD('$MYSQL_ROOT_PW')\"" >> ${logdir}/main.log
|
||||||
|
|
||||||
|
${MYSQL_INSTALL_DIR}/bin/mysql -S $MYSQL_UNIX_SOCKET -uroot mysql -N -s -e "ALTER USER root@localhost IDENTIFIED VIA mysql_native_password USING PASSWORD('$MYSQL_ROOT_PW')" \
|
||||||
|
>> ${logdir}/main.log 2>&1
|
||||||
|
if [ "$?" = "0" ]; then
|
||||||
|
echo_ok
|
||||||
|
else
|
||||||
|
echo_failed
|
||||||
|
error Konnte root Passwort für den MariaDB Server nicht setzen..
|
||||||
|
|
||||||
|
echononl "continue anyway [yes/no]: "
|
||||||
|
read OK
|
||||||
|
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
|
||||||
|
echononl "Wrong entry! - repeat [yes/nno]: "
|
||||||
|
read OK
|
||||||
|
done
|
||||||
|
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
|
||||||
|
fi
|
||||||
|
|
||||||
|
## - Flush privileges
|
||||||
|
## -
|
||||||
|
echononl "Neu Einlesen der Berechtigung (MySQL Server).."
|
||||||
|
echo "" >> ${logdir}/main.log
|
||||||
|
echo "## - Neu Einlesen der Berechtigung (MySQL Server)" >> ${logdir}/main.log
|
||||||
|
echo "## -" >> ${logdir}/main.log
|
||||||
|
echo "${MYSQL_INSTALL_DIR}/bin/mysql -S $MYSQL_UNIX_SOCKET -uroot -p$MYSQL_ROOT_PW mysql -N -s -e \"FLUSH PRIVILEGES\"" >> ${logdir}/main.log
|
||||||
|
${MYSQL_INSTALL_DIR}/bin/mysql -S $MYSQL_UNIX_SOCKET -uroot -p$MYSQL_ROOT_PW mysql -N -s -e "FLUSH PRIVILEGES" >> ${logdir}/main.log 2>&1
|
||||||
|
if [ "$?" = "0" ]; then
|
||||||
|
echo_ok
|
||||||
|
else
|
||||||
|
echo_failed
|
||||||
|
error Das Laden/Erneuern der Berechtigungen für die MySQL Datenbank ist fehlgeschlagen..
|
||||||
|
|
||||||
|
echononl "continue anyway [yes/no]: "
|
||||||
|
read OK
|
||||||
|
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
|
||||||
|
echononl "Wrong entry! - repeat [yes/nno]: "
|
||||||
|
read OK
|
||||||
|
done
|
||||||
|
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
|
||||||
|
fi
|
||||||
|
|
||||||
|
elif [[ "$MYSQL_DISTRIBUTION" = "MariaDB" ]] \
|
||||||
|| ( [[ "$MYSQL_DISTRIBUTION" = "MySQL" ]] \
|
|| ( [[ "$MYSQL_DISTRIBUTION" = "MySQL" ]] \
|
||||||
&& [[ $MYSQL_MAJOR_VERSION -eq 5 ]] \
|
&& [[ $MYSQL_MAJOR_VERSION -eq 5 ]] \
|
||||||
&& [[ $MYSQL_MINOR_VERSION -le 6 ]] ); then
|
&& [[ $MYSQL_MINOR_VERSION -le 6 ]] ); then
|
||||||
@ -5650,7 +5749,34 @@ if ! $UPDATE_MYSQL || $_sys_maint_cnf_needed ; then
|
|||||||
|
|
||||||
fi # if [[ "$MYSQL_MAJOR_VERSION" -lt 8 ]]
|
fi # if [[ "$MYSQL_MAJOR_VERSION" -lt 8 ]]
|
||||||
|
|
||||||
|
|
||||||
echononl "Give 'Grant' permission to MySQL User '${_maint_user}'.."
|
echononl "Give 'Grant' permission to MySQL User '${_maint_user}'.."
|
||||||
|
|
||||||
|
if [[ "$MYSQL_DISTRIBUTION" = "MariaDB" ]] \
|
||||||
|
&& [[ $MYSQL_MINOR_VERSION -ge 4 ]] ; then
|
||||||
|
|
||||||
|
# - All user accounts, passwords, and global privileges are now stored in
|
||||||
|
# - the mysql.global_priv table. The mysql.user table still exists and has
|
||||||
|
# - exactly the same set of columns as before, but it’s now a view that
|
||||||
|
# - references the mysql.global_priv table. Tools that analyze the mysql.user
|
||||||
|
# - table should continue to workas before.
|
||||||
|
# -
|
||||||
|
# - See also:
|
||||||
|
# - https://mariadb.com/kb/en/library/authentication-from-mariadb-104/
|
||||||
|
|
||||||
|
echo_skipped
|
||||||
|
|
||||||
|
warn "Column 'Grant_priv' is not updatable.
|
||||||
|
|
||||||
|
However, root@localhost user is allowed to login without a password
|
||||||
|
via the local Unix socket file defined by the socket system variable,
|
||||||
|
as long as the login is attempted from a process owned by the operating
|
||||||
|
system root user account.
|
||||||
|
|
||||||
|
as user root use:
|
||||||
|
\033[37m\033[1mmysql -S $MYSQL_UNIX_SOCKET\033[m"
|
||||||
|
|
||||||
|
else
|
||||||
echo "" >> ${logdir}/main.log
|
echo "" >> ${logdir}/main.log
|
||||||
echo "## - Give 'Grant' permission to MySQL User '${_maint_user}'" >> ${logdir}/main.log
|
echo "## - Give 'Grant' permission to MySQL User '${_maint_user}'" >> ${logdir}/main.log
|
||||||
echo "## -" >> ${logdir}/main.log
|
echo "## -" >> ${logdir}/main.log
|
||||||
@ -5671,6 +5797,7 @@ if ! $UPDATE_MYSQL || $_sys_maint_cnf_needed ; then
|
|||||||
done
|
done
|
||||||
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
|
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
echononl "Neu Einlesen der Berechtigung (MySQL Server).."
|
echononl "Neu Einlesen der Berechtigung (MySQL Server).."
|
||||||
echo "" >> ${logdir}/main.log
|
echo "" >> ${logdir}/main.log
|
||||||
|
Loading…
Reference in New Issue
Block a user