การให้สิทธิใน MySQL

การให้สิทธิใน MySQL ใช้คำสั่ง Grant เช่น
grant all on *.* to jack@localhost identified by 'xxxx';
เป็นการให้สิทธิทั้งหมดแก่ user jack@localhost
แต่ถ้าต้องการให้สิทธิบางส่วนเช่น ให้สิทธิเฉพาะฐานข้อมูลที่กำหนดให้ใช้ึคำสั่ง
grant all on mydb.* to jack@localhost identified by 'xxxx';
ที่มา: GRANT Syntax