Novo

Forum kao aplikacija na telefonu

Dodajte forum na početni ekran i koristite ga kao aplikaciju, sa menijem na dnu ekrana.

  • 2 odgovora
  • 2.207 pregleda

Najnovija ↓

Ograniciti user-a na jednu bazu 29.03.2009. u 20:10 · pre 214 meseci #1
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?
Re: Ograniciti user-a na jednu bazu 29.03.2009. u 20:27 · pre 214 meseci #2
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> 

Potpis
arhimed
http://www.mysql.rs/ | http://elco.crsndoo.com/
Prijavite se da biste odgovorili u ovoj temi.PrijavaRegistracija

Premeštanje teme