Create view for users
mysql> mysql> CREATE OR REPLACE VIEW USERS -> (USER_NAME) AS -> SELECT DISTINCT UPPER(CONCAT('''',USER,'''@''',HOST,'''')) -> FROM MYSQL.USER; Query OK, 0 rows affected (0.00 sec) mysql>