ELMIT
July 15th, 2008, 03:09 AM
I try to add a new user (abc), who should use a certain database (xyz)
I tried it with phpmyadmin:
A
==
1. I created an empty database xyz (main page of phpmyadmin)
2. I added a new user on the Privileges page with:
User: abc
Host: Any (%)
Password: (yes)
Global privileges:
(Data:) SELECT, INSERT, UPDATE, DELETE, FILE
(Structure:) CREATE, ALTER, INDEX, DROP, CREATE TEMPORARY TABLES
(Administration:) (nothing ticked)
(Resource limits:) (nothing ticked)
What does it mean so far? Can the user abc already access data of any
database? I guess no.)
B
==
I found "Database-specific privileges" for the user abc, where I added
the database xyz and ticked:
(Data:) SELECT, INSERT, UPDATE, DELETE
(Structure:) CREATE, ALTER, INDEX, DROP, CREATE TEMPORARY TABLES
(Administration:) (nothing ticked)
What confuses me is that I have already some databases setup for my own
web, but none of the users has "B" attached.
Currently I am going away from a single person using the database to
allow others also to use the database.
Trying to login (after Flush Privileges) on the commandline:
mysql -u abc -p xyz
and typing in the password of abc
I get a:
ERROR 1045 (28000): Access denied for user 'abc'@'localhost' (using password: YES)
I tried than to use the GRANT statement in mysql:
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, FILE, INDEX, ALTER, CREATE TEMPORARY TABLES ON detteweb.* TO "abc"@"%"IDENTIFIED BY "mypassword";
FLUSH PRIVILEGES;
with the same result: user abc cannot login to the database.
What do I miss?
bye
R.
I tried it with phpmyadmin:
A
==
1. I created an empty database xyz (main page of phpmyadmin)
2. I added a new user on the Privileges page with:
User: abc
Host: Any (%)
Password: (yes)
Global privileges:
(Data:) SELECT, INSERT, UPDATE, DELETE, FILE
(Structure:) CREATE, ALTER, INDEX, DROP, CREATE TEMPORARY TABLES
(Administration:) (nothing ticked)
(Resource limits:) (nothing ticked)
What does it mean so far? Can the user abc already access data of any
database? I guess no.)
B
==
I found "Database-specific privileges" for the user abc, where I added
the database xyz and ticked:
(Data:) SELECT, INSERT, UPDATE, DELETE
(Structure:) CREATE, ALTER, INDEX, DROP, CREATE TEMPORARY TABLES
(Administration:) (nothing ticked)
What confuses me is that I have already some databases setup for my own
web, but none of the users has "B" attached.
Currently I am going away from a single person using the database to
allow others also to use the database.
Trying to login (after Flush Privileges) on the commandline:
mysql -u abc -p xyz
and typing in the password of abc
I get a:
ERROR 1045 (28000): Access denied for user 'abc'@'localhost' (using password: YES)
I tried than to use the GRANT statement in mysql:
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, FILE, INDEX, ALTER, CREATE TEMPORARY TABLES ON detteweb.* TO "abc"@"%"IDENTIFIED BY "mypassword";
FLUSH PRIVILEGES;
with the same result: user abc cannot login to the database.
What do I miss?
bye
R.