creating users through mysql admin, but unable to login mysql command line
following on-line suggestions, as root issued
grant all on *.* to new_user;
it worked, but security-wise was a mess, so issued
revoke all on *.* from new_user;
now new_user can still connect, but security is sane as set in mysql admin
to me this is thoroughly hocus-pocus. what’s really going on, and how do you really enable login?
this seems to be a MySQL Administrator problem (thanks @marco). if the same GRANT is issued in mysql command line, the user can log in; but it the grant is issued in Administrator, the user cannot log in.
as @marco pointed out, any access will grant mysql login access to the user, eg, SELECT privileges – but they need to be entered in msql command line.
That’s because when you first use
GRANT, user is created automatically; when you revoke privileges, user remains…Check this link.
First you should give your user only the privileges he really needs.
Second: give the user access only to db or tables he should see/work on.
Example:
or
EDITED:
Just to prove what I’m saying:
enter mysql console (
mysql -u root -p) and typeYou’ll see users MySql has inside.
Well, now use
GRANTas you please on a user which does not exists yet; then repeatSELECT * FROM user;: you’ll see new user created!!