I am shocked why it is so annoying to create a super-user on MySQL
I create a user and assigned password and ran the following, yet this user can not grant access to a database!
created user and granted privileges for all databases
mysql> CREATE USER 'app-user-1'@'%' IDENTIFIED BY 'password123';
Query OK, 0 rows affected (0.34 sec)
mysql> GRANT ALL PRIVILEGES ON `%`.* TO 'app-user-1'@'%' IDENTIFIED BY 'password123';
Query OK, 0 rows affected (0.24 sec)
GRANT ALL PRIVILEGES ON `%`.* TO 'app-user-1'@'%' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.19 sec)
but then when i log in as this user and tried to grant privilege to a database, then i get ERROR 1044 (42000): Access denied for user ...
mysql> SHOW GRANTS FOR 'app-user-1'@'%';
+------------------------------------------------------------------------+
| Grants for app-user-1@% |
+------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO `app-user-1`@`%` |
| GRANT ALL PRIVILEGES ON `app-db-1`.* TO `app-user-1`@`%` |
| GRANT ALL PRIVILEGES ON `%`.* TO `app-user-1`@`%` |
+------------------------------------------------------------------------+
3 rows in set (0.19 sec)
mysql> GRANT ALL PRIVILEGES ON `app-db-1`.* TO 'app-user-1'@'%';
ERROR 1044 (42000): Access denied for user 'app-user-1'@'%' to database 'app-db-1'
mysql> GRANT ALL PRIVILEGES ON `%`.* TO 'app-user-1'@'%' WITH GRANT OPTION;
ERROR 1044 (42000): Access denied for user 'app-user-1'@'%' to database '%'
mysql> GRANT ALL PRIVILEGES ON *.* TO 'app-user-1'@'%' WITH GRANT OPTION;
ERROR 1045 (28000): Access denied for user 'app-user-1'@'%' (using password: YES)
mysql> GRANT ALL PRIVILEGES ON *.* TO 'app-user-1'@'%';
ERROR 1045 (28000): Access denied for user 'app-user-1'@'%' (using password: YES)
mysql> GRANT ALL PRIVILEGES ON `%`.* TO 'app-user-1'@'%';
ERROR 1044 (42000): Access denied for user 'app-user-1'@'%' to database '%'
What am i missing here?