MySQL root user
I am trying to understand the instructions here:
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).
You can use wildcards when you grant permissions.
Root is just another user with all the privileges
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.
CREATE USER 'Mary'@'%' IDENTIFIED BY 'a strong password';
GRANT ALL ON *.* TO 'Mary'@'%';
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;
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)