Must privileges apply to a particular database? What I want to say is 'create a user called Mary and give her all privileges on all future databases', or in other words (if possible), 'create a user called Mary and make her a root user' (I am not sure if there can be more than one root user).
CREATE USER 'Mary'@'%' IDENTIFIED BY 'a strong password';
GRANT ALL ON *.* TO 'Mary'@'%';
It would be nice if you didn't say 'Mary'@'%', but instead narrowed it down to something like.... localhost, or an ip address, or subnet mask.
There can be more than one root user. 'username'@'host-specification'.
You can have root@localhost, firstname.lastname@example.org, email@example.com, root@your-own-host-spec (yeah that's valid, with the hyphens... good luck resolving it). All of them can have different passwords. I think you can even limit privileges from some root accounts (I would think root@localhost would be the only exception, but then again, you might be able to delete the root@localhost account... I'm not willing to try and find out).
Last edited by eval(BadCode); 08-14-2012 at 08:38 AM.
I use (, ; : -) as I please- instead of learning the English language specification: I decided to learn Scheme and Java;