Clear extra access hosts for system account during db removal

Version 1.53

Bugfix
Finished

Bug where if you have an extra access host on a DB, let's call it: 1.2.3.4 when you delete that DB, the system account "user" will still have the 1.2.3.4 access host in the mysql.user table. Fix was to run a query before the DB removal, that clears all instances of that user, where the access host does not exist in any other DB in mysql.db. Query logic is: DELETE FROM mysql.user WHERE host NOT IN (SELECT host FROM mysql.db WHERE (db!='username_db' AND db!='username\_db'') AND (db LIKE 'username_%' OR db LIKE 'username\_%')) AND user='username'

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