Removal of access hosts clearing from mysql.user for shared user

Version 1.59.0


If you had a shared User spanning multiple databases, then removing an access that was on both databases ended up clearing the user@ from mysql.user, preventing user@ from being used on the other DB. The old method was simply clearing all instances from mysql.user and mysql.db, which was not using the new REVOKE/DROP USER methods anyway. This change makes use of the mysql_use_new_user_methods option (including mysql_detect_correct_methods=1), and will instead: 1) Revoke user_dbuser@ from user_dbname.* 2) If user_dbuser@ exists on no other database in mysql.db, DROP USER from mysql.user. This fix also affects the system account, which is shared over all DBs, and was incorrectly being cleared from all DBs for that given access host, when the host was only removed from one DB. This also changes the logic for older MySQL/MariaDB versions not using the new method (using mysql_use_new_user_methods=0, or mysql_detect_correct_methods=1 detects old version)

Interested to try DirectAdmin? Get a 30-day Free Trial!