1
2
3
4
| CREATE DATABASE dbname;
CREATE USER 'dbusername'@'localhost';
SET PASSWORD FOR 'dbusername'@'localhost' = PASSWORD('PASSWORD');
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX,ALTER,CREATE TEMPORARY TABLES,LOCK TABLES,REFERENCES ON dbname.* TO `dbusername`@`localhost` WITH GRANT OPTION; |