You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mysqltuner.pl
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1820,12 +1820,14 @@ sub security_recommendations {
1820
1820
if ( mysql_version_ge(10, 4) ) {
1821
1821
@mysqlstatlist = select_array
1822
1822
q{SELECT CONCAT(user, '@', host) FROM mysql.global_priv WHERE
1823
-
JSON_CONTAINS(Priv, '"mysql_native_password"', '$.plugin') AND JSON_CONTAINS(Priv, '""', '$.authentication_string')
1823
+
user != ''
1824
+
AND JSON_CONTAINS(Priv, '"mysql_native_password"', '$.plugin') AND JSON_CONTAINS(Priv, '""', '$.authentication_string')
1824
1825
AND NOT JSON_CONTAINS(Priv, 'true', '$.account_locked')};
1825
1826
}
1826
1827
else {
1827
1828
@mysqlstatlist = select_array
1828
1829
"SELECT CONCAT(user, '\@', host) FROM mysql.user WHERE ($PASS_COLUMN_NAME = '' OR $PASS_COLUMN_NAME IS NULL)
1830
+
AND user != ''
1829
1831
/*!50501 AND plugin NOT IN ('auth_socket', 'unix_socket', 'win_socket', 'auth_pam_compat') */
1830
1832
/*!80000 AND account_locked = 'N' AND password_expired = 'N' */";
1831
1833
}
@@ -1853,7 +1855,7 @@ sub security_recommendations {
1853
1855
1854
1856
# Looking for User with user/ uppercase /capitalise user as password
1855
1857
@mysqlstatlist = select_array
1856
-
"SELECT CONCAT(user, '\@', host) FROM mysql.user WHERE CAST($PASS_COLUMN_NAME as Binary) = PASSWORD(user) OR CAST($PASS_COLUMN_NAME as Binary) = PASSWORD(UPPER(user)) OR CAST($PASS_COLUMN_NAME as Binary) = PASSWORD(CONCAT(UPPER(LEFT(User, 1)), SUBSTRING(User, 2, LENGTH(User))))";
1858
+
"SELECT CONCAT(user, '\@', host) FROM mysql.user WHERE user != '' AND (CAST($PASS_COLUMN_NAME as Binary) = PASSWORD(user) OR CAST($PASS_COLUMN_NAME as Binary) = PASSWORD(UPPER(user)) OR CAST($PASS_COLUMN_NAME as Binary) = PASSWORD(CONCAT(UPPER(LEFT(User, 1)), SUBSTRING(User, 2, LENGTH(User)))))";
0 commit comments