Create MySQL Users Accounts and Grant Privileges
Creating MySQL account
mysql> CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';Setting user privileges with grant command
Setting user privileges
mysql> GRANT ALL PRIVILEGES ON dbname.table TO 'userID'@'host' IDENTIFIED BY 'password';Setting access privileges to all databases and tables
mysql> GRANT ALL PRIVILEGES ON *.* TO userID@host IDENTIFIED BY 'password';Grant privileges to all databases and tables and allow local and remote connections
mysql> GRANT ALL PRIVILEGES ON *.* to userID@'%' IDENTIFIED BY 'password';Apply configured privileges
Remove privileges
View privileges
Last updated