Comments - mariadb drop user "wildcard"

2 years, 10 months ago Mark Edwards
SELECT GROUP_CONCAT(QUOTE(user),'@',QUOTE(host)) INTO @accounts FROM mysql.user WHERE user = 'ILOVEMARIADB';
EXECUTE IMMEDIATE CONCAT('DROP USER ', @accounts);

thank you Daniel! life keeps getting better and better (while the solution shrinks). it still surprises me this requires a procedure, but this is EXCELLENT!

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.