Use one of the following commands to grant ALL PRIVILEGES to a MySQL

user: All databases, All table

  1. user: All databases

GRANT ALL PRIVILEGES ON database_name.* TO 'username''@'localhost';
  1. All table databases

GRANT ALL PRIVILEGES ON database_name.table_name TO 'username'@'localhost';

Last updated