|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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!
Thanx! |
|
#2
|
|||
|
|||
|
grant all on dbname.* to username@localhost identified by 'password';
|
|
#3
|
|||
|
|||
|
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. |
|
#4
|
|||
|
|||
|
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.
|
|
#5
|
|||
|
|||
|
why does eveyone restart mysqld ??
i always adjust privileges and it just works immediately ?!?! no restart needed |
|
#6
|
|||
|
|||
|
wouterr,
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. |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > MySql -Database-Permissions |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|