How do I create, list and delete users?
Create a user:
GRANT ALL PRIVILEGES ON *.* TO the_user@localhost IDENTIFIED BY 'the_password';
Replace the_user and the_password.
Watch out... even if you have done a "USE database" this command applies
to all database on your mysql server. So a good practice is to prefix
the userid with the database name: eg customers_smith.
To List users:
select user from mysql.user;
select * from mysql.user;
Delete a user:
drop user the_user;
delete from mysql.user WHERE user='the_user'