24 October 2013

Clone a MySQL Table

First, create the new table.
CREATE TABLE new_table LIKE original_table;
Then, copy over the data.
INSERT INTO new_table SELECT * FROM original_table;

09 October 2013

GRANT MySQL with Limited Power

Grant only SELECT, INSERT and UPDATE to user.
GRANT SELECT,INSERT,UPDATE ON database.cryptonite TO 'superman@locahost';