FreeBSD

Mysql Cheat Sheet for Grant Permissions

Submitted by sklav on Fri, 02/04/2011 - 11:11

An example of how to add SELECT privileges to a user using GRANT

GRANT SELECT ON projectdb.* TO user@'localhost' IDENTIFIED BY 'passwd';

If SELECT is not enough for our user we can add more privileges using a query similar to the one below:

An example of how to add a selection of privileges to a user using GRANT

GRANT SELECT, INSERT, DELETE ON projectdb.* TO user@'localhost' IDENTIFIED BY 'passwd';

If you want to GRANT ALL the privileges to a user then use this query:

An example of how to Grant Privileges in MySQL

Using GMirror on FreeBSD 7.1

Submitted by sklav on Mon, 08/24/2009 - 12:46

[Allow the mounted disk (ad0) to be modified by gmirror]

This step allows the gmirror utility to modify your drive while it is mounted and is a one time operation during gmirror setup, and will not be restored on reboot.

# sysctl kern.geom.debugflags=16

[Create the mirror on ad0]

This command modifies the drive label meta-data on your hard disk so that it is recognized as a gmirror RAID disk. In the example I set gm0 but you can give it any label you like as long as you’re consistent. You will need this later to modify your /etc/fstab.