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>