عرض مشاركة واحدة
Banned
تاريخ التسجيل: Sep 2000-
#12 (permalink)  

Creating a Database User
We've created the database and put some data in there, now we must create a user
account. This user will have access to this database. We create the user and grant
privileges with the GRANT command:
كود PHP:
mysqlGRANT usage
-> ON example.*
-> 
TO webuser@localhost
Query OK, 0 rows affected (0.15 sec)
This creates a new user called webuser. This user can connect only from localhost, and he
has the ability to connect to the example database. Next we have to specify what
operations webuser can perform:
كود PHP:
mysqlGRANT selectinsertdelete
-> ON example.*
-> 
TO webuser@localhost
Query OK, 0 rows affected (0.00 sec)
This gives webuser the ability to execute SELECT, INSERT, and DELETE queries on every
table of the example database. Our work is done here, exit the MySQL client:






from-bahrain غير متواجد حالياً   قديم 16-05-2002, 10:28 PM