# Grant access rights to scone DB for user scone with password sc0ne
FLUSH PRIVILEGES;

#These entries seem to avoid usefull user management
DELETE FROM mysql.user WHERE User='';
DELETE FROM mysql.db WHERE User='';
DELETE FROM mysql.tables_priv WHERE User='';
DELETE FROM mysql.columns_priv WHERE User='';

#now give access to user scone.
GRANT Select, Insert, Update, Delete, Index, Alter, Create, Drop, References ON scone.* TO 'scone'@'%' IDENTIFIED BY 'sc0ne';
UPDATE mysql.user SET  Select_priv = 'Y',  Insert_priv = 'Y',  Update_priv = 'Y',  Delete_priv = 'Y',  Create_priv = 'N',  Drop_priv = 'N',  Reload_priv = 'N',  Shutdown_priv = 'N',  Process_priv = 'N',  File_priv = 'N',  Grant_priv = 'N',  References_priv = 'N',  Index_priv = 'N',  Alter_priv = 'N' WHERE Host = '%' AND User = 'scone';

FLUSH PRIVILEGES
