Problem creating new user with all privileges
I'm running Server version: 8.0.20-0ubuntu0.20.04.1 (Ubuntu) and trying to add a user and grant all privileges. On initial installation Root password was set and user for myself was created and all privileges were granted to myself. Now I need to create a new user with all privileges granted but can't log in as Root to grant all privileges to the new user and it won't allow me to grant the privileges. Here are the commands I've tried:
mysql> CREATE USER 'xxxxx_xxx' identified by 'yyyy';
Query OK, 0 rows affected (0.01 sec)
mysql> GRANT ALL PRIVILEGES ON * . * TO 'xxxxx_xxx'@'localhost'
ERROR 1044 (42000): Access denied for user 'me'@'localhost' to database 'zzzzz'
I've verified my privileges as follows:
Grants for larry@localhost |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, CREATE ROLE, DROP ROLE ON *.* TO `larry`@`localhost` |
| GRANT APPLICATION_PASSWORD_ADMIN,AUDIT_ADMIN,BACKUP_ADMIN,BINLOG_ADMIN,BINLOG_ENCRYPTION_ADMIN,CLONE_ADMIN,CONNECTION_ADMIN,ENCRYPTION_KEY_ADMIN,GROUP_REPLICATION_ADMIN,INNODB_REDO_LOG_ARCHIVE,PERSIST_RO_VARIABLES_ADMIN,REPLICATION_APPLIER,REPLICATION_SLAVE_ADMIN,RESOURCE_GROUP_ADMIN,RESOURCE_GROUP_USER,ROLE_ADMIN,SERVICE_CONNECTION_ADMIN,SESSION_VARIABLES_ADMIN,SET_USER_ID,SHOW_ROUTINE,SYSTEM_USER,SYSTEM_VARIABLES_ADMIN,TABLE_ENCRYPTION_ADMIN,XA_RECOVER_ADMIN ON *.* TO `larry`@`localhost` |
Can someone help me out on this?