| 155 | }}} |
| 156 | |
| 157 | {{{ |
| 158 | #!comment |
| 159 | This is a more secure approach but will not work for new projects because make_project tries to create and drop the database on its own. Existing projects should change the permissions accordingly. |
| 160 | |
| 161 | mysql -u root |
| 162 | CREATE DATABASE `db_name`; |
| 163 | CREATE USER 'db_user'@'localhost' IDENTIFIED BY 'db_password'; |
| 164 | GRANT USAGE ON *.* TO 'db_user'@'localhost' |
| 165 | GRANT ALL PRIVILEGES ON `db_name`.* TO 'db_user'@'localhost'; |
| 166 | |
| 167 | mysql -u root |
| 168 | REVOKE ALL PRIVILEGES ON *.* FROM 'db_name'@'localhost'; |
| 169 | REVOKE ALL PRIVILEGES ON *.* FROM 'nobody'@'localhost'; |