MySQL Forums
Forum List  »  Newbie

Re: HOW DO CREATED USERS LOG ON MySQL CLI?
Posted by: Rick James
Date: February 19, 2009 11:02PM

Are the users logged into the machine where mysql is running? If not, then you needed 'allow users to connect remotely' was needed (this probably leads to a setting in my.cnf (my.ini)). Plus, ...
GRANT ALL ON dbname.* TO 'Bruv'@'%' IDENTIFIED BY 'pwd';
'%' says they can come from any machine. You could be more restrictive by putting the hostname or IP address there.

CREATE USER is unnecessary if you spell out all the pieces of the GRANT.

'localhost' connects through a "socket" only from the machine itself.

'root' is granted all access with no pwd -- a security hole. One should promptly add a password for root.

The @'%' is a security hole if your LAN can be reached from the outside. Of course, you could trust some firewall to keep crackers from getting in on port 3306. They _will_ try.

Options: ReplyQuote


Subject
Written By
Posted
Re: HOW DO CREATED USERS LOG ON MySQL CLI?
February 19, 2009 11:02PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.