1use mysql;
2CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
3GRANT ALL ON *.* TO 'username'@'localhost';
4flush privileges;
5
1use mysql;
2
3
4DROP USER 'jeffrey'@'localhost';
5# FOR DELETING USER #error 1396
6
7DROP DATABASE databasename
8# TO DELETE DATABASE #error 1007
9
10
11
12CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
13GRANT ALL ON *.* TO 'username'@'localhost';
14flush privileges;
15
16CREATE USER 'wordpressuser'@'localhost' IDENTIFIED BY 'password';
17# Remember the quote in used is not around the @ symbol, and it is not ‘ ’
18# but ' '.
19# And the first thing to do is to provide
20# the user with access to the information this wordpressuser will need.
21
22GRANT ALL PRIVILEGES ON * . * TO 'wordpressuser'@'localhost';
23
24# The asterisks in this command refer to the database and table (respectively)
25# that they can access—this specific command allows to the user to read, edit, execute and perform all tasks across all the databases and tables.
26
27# Once you have finalized the permissions that you want to set up for
28# your new wordpressuser, always be sure to reload all the privileges.
29
30
31FLUSH PRIVILEGES;