MySQL create user with grant all privileges

Login to your MySQL

mysql -u root -p

Enter your MySQL root password.

GRANT ALL ON *.* TO 'username'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
GRANT ALL ON *.* TO 'username'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;

New user with grant all privileges has been created successfully.