September 4th, 2000, 02:27 AM
How can i make that a DB-User can only access one Database on my MySql and don't have the permission to access all the Databases!
September 4th, 2000, 09:54 AM
grant all on dbname.* to username@localhost identified by 'password';
September 5th, 2000, 02:35 AM
But if i stop and restart the Mysql-Deamon i must redo this command or it would be done automatically??
It's a great day - today.
September 5th, 2000, 10:42 AM
GRANT automatically updates the permission tables and flushes privileges so it takes effect immediately. These privilege tables are read when the deamon starts, so no, you don't have to redo them.
September 7th, 2000, 01:43 PM
why does eveyone restart mysqld ??
i always adjust privileges and it just works immediately ?!?!
no restart needed
September 8th, 2000, 10:36 AM
The reason is that before GRANT, you had to manipulate the privilege tables directly. You could do a FLUSH PRIVILEGES to force mysql to re-read them so the new privileges would take affect, but many people would restart the daemon instead.
GRANT does away with all that as it flushes automatically after updating the tables.
I really don't know why some people still insist on updating the tables directly themselves. GRANT is much easier to use and safer.