Now we’ll need some sample users for our continuing process. You’ll be setting up these users:
herbie (password ‘hacker’)
carrie (password ‘cracker’)
arnold (password ‘admin’)
yulia (password ‘user’)
fred (password ‘freeloader’)
george (password ‘good’)
yanni (password ‘user’)
Setting them up manually, one at a time, is silly. Use a script. Download this file: users.sql
Put it in a convenient place, then open it in a text editor and take a look. Then, open the mysql client, and run (source) it:
\. users.sql
What results do you get? Why?
Correct any problems in this script until it will run properly. You may need to take a look at this page: http://dev.mysql.com/doc/refman/5.0/en/grant.html.
Finally, implement the privileges (within the mysql client):
FLUSH PRIVILEGES;
MySQL will not enable your changes until you perform this step.
An alternate way to flush privileges is to exit the client and type:
mysqladmin –u root –p reload