Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Ograniciti user-a na jednu bazu

[es] :: MySQL :: Ograniciti user-a na jednu bazu

[ Pregleda: 1647 | Odgovora: 2 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

kefalo
Banjaluka, RS, BiH

Član broj: 18959
Poruke: 263
193.170.53.*

ICQ: 178873696
Sajt: home.blic.net/mozlas


+6 Profil

icon Ograniciti user-a na jednu bazu29.03.2009. u 19:10 - pre 183 meseci
kako ograniciti jednog user-a da ima pristup samo jednoj bazi podataka a da drugima ne moze pristupiti pa cak ni vidjeti ostale baze koje su na serveru?
 
Odgovor na temu

bogdan.kecman
Bogdan Kecman
"specialist"
Oracle
srbistan

Član broj: 201406
Poruke: 15887
*.mysql.com.

Sajt: mysql.rs


+2377 Profil

icon Re: Ograniciti user-a na jednu bazu29.03.2009. u 19:27 - pre 183 meseci
dodelis mu privilegije samo za tu bazu ...

na primer:

Code:

[arhimed@gedora10 6.3.21]$ bin/mysql -uroot 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.1.31-ndb-6.3.21-innodb-log Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema | 
| d1                 | 
| d2                 | 
| database2          | 
| mysql              | 
| sbtest             | 
+--------------------+
6 rows in set (0.00 sec)

mysql> grant all privileges on d2.* to 'luzer'@'localhost' identified by 'pera';
Query OK, 0 rows affected (0.00 sec)

mysql> quit
Bye
[arhimed@gedora10 6.3.21]$ mysql -uluzer -ppera
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.1.31-ndb-6.3.21-innodb-log Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema | 
| d2                 | 
+--------------------+
2 rows in set (0.00 sec)

mysql> 


 
Odgovor na temu

kefalo
Banjaluka, RS, BiH

Član broj: 18959
Poruke: 263
193.170.53.*

ICQ: 178873696
Sajt: home.blic.net/mozlas


+6 Profil

icon Re: Ograniciti user-a na jednu bazu29.03.2009. u 19:36 - pre 183 meseci
hvala puno na brzom odgovoru.
to je to sto trazim! :)
 
Odgovor na temu

[es] :: MySQL :: Ograniciti user-a na jednu bazu

[ Pregleda: 1647 | Odgovora: 2 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.