Am I getting the 'GRANT command denied' error because even though I am root, CURRENT_USER() is identified as 'root'@'%' and GRANT ALL PRIVILEGES 'WITH GRANT OPTION' is only given to 'root'@'localhost' and therefore, 'root'@'%' is not evaluating to be the equivalent of 'root'@'localhost'?
Sim, você está correto. Snippet da documentação do mysql
To use GRANT, you must have the GRANT OPTION privilege, and you must have the privileges that you are granting.
The WITH GRANT OPTION clause gives the user the ability to give to other users any privileges the user has at the specified privilege level. You should be careful to whom you give the GRANT OPTION privilege because two users with different privileges may be able to combine privileges!
A solução seria conectar mysql
do localhost com root
user e alterar o privilégio de root@%
.