การมอบสิทธิ์
-> grant all on db_name.* to username identified by
'passwd';
โดย grant
หมายถึง คำสั่งสำหรับการมอบสิทธิ์
all หมายถึง
ให้สิทธิ์ทุกอย่างในการทำงานกับ database นั้น ๆ
db_name หมายถึง ชื่อของ database
ที่ต้องการให้สิทธิ์
ถ้าเป็น *.* จะหมายถึงการให้สิทธิ์ในทุก database ที่มีอยู่
to username
หมายถึง ให้กับ user คนใด
identified by 'passwd' หมายถึง
การระบุ password ของ user ว่าให้เข้าด้วย passwd
นี้
ในการ ให้สิทธิ์ user ถ้า user ต้องการใช้งาน mambo ต้องมี
user_name@localhost (ใส่ @ เพื่อ
ระบุค่าเริ่มต้นให้เริ่มจาก localhost)
คำสั่งในการแสดง database ทั้งหมด
-> show databases;
การ set passwd ของผู้เข้าใช้
-> mysql> password set = password
'passwd'