mirror of
https://github.com/MariaDB/server.git
synced 2026-04-19 06:45:32 +02:00
MDEV-36815 Fresh MariaDB 11.4 installation gives errors when configuring utf8
rewrite the check to use mysql.global_priv (finally!)
This commit is contained in:
parent
46135c625b
commit
04122ed770
1 changed files with 7 additions and 1 deletions
8
debian/additions/debian-start.inc.sh
vendored
8
debian/additions/debian-start.inc.sh
vendored
|
|
@ -84,7 +84,13 @@ function check_root_accounts() {
|
|||
|
||||
logger -p daemon.info -i -t"$0" "Checking for insecure root accounts."
|
||||
|
||||
ret=$(echo "SELECT count(*) FROM mysql.user WHERE user='root' and password='' and password_expired='N' and plugin in ('', 'mysql_native_password', 'mysql_old_password');" | $MARIADB --skip-column-names)
|
||||
ret=$(echo "
|
||||
SELECT count(*) FROM mysql.global_priv
|
||||
WHERE user='root' AND
|
||||
JSON_VALUE(priv, '$.plugin') in ('mysql_native_password', 'mysql_old_password', 'parsec') AND
|
||||
JSON_VALUE(priv, '$.authentication_string') = '' AND
|
||||
JSON_VALUE(priv, '$.password_last_changed') != 0
|
||||
" | $MARIADB --skip-column-names)
|
||||
if [ "$ret" -ne "0" ]
|
||||
then
|
||||
logger -p daemon.warn -i -t"$0" "WARNING: mysql.user contains $ret root accounts without password!"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue