Create mysql user with password :
# mysql
# create user wpuser identified by ‘wppass’;
Note : wpuser is the mysql username and follow by wppass is the mysql user password.
Grant privileges to mysql db :
# grant all privileges on wordpress.* to ‘wpuser’@'localhost’ identified by ‘wppass’;
Check privileges :
show grants for ‘wpuser’@'localhost’;
+————————————————————————————–+
| Grants for wpuser@localhost |
+————————————————————————————–+
| GRANT USAGE ON *.* TO ‘wpuser’@'localhost’ IDENTIFIED BY PASSWORD ’7171e928058581f3′ |
| GRANT ALL PRIVILEGES ON `wordpress`.* TO ‘wpuser’@'localhost’ |
+————————————————————————————–+
2 rows in set (0.01 sec)