< MySQL
Content added Content deleted
imported>mutante No edit summary |
imported>mutante (creating a new mysql database and user) |
||
Line 5: | Line 5: | ||
</pre> |
</pre> |
||
Create a new database "grudnuk": |
Create a new database "grudnuk": |
||
<pre> |
|||
CREATE DATABASE grudnuk; |
CREATE DATABASE grudnuk; |
||
</pre> |
|||
Give permissions to the user "fnord" on all tables of the db "grudnuk": |
Give permissions to the user "fnord" on all tables of the db "grudnuk": |
||
<pre> |
|||
GRANT SELECT, INSERT,UPDATE,DELETE,CREATE,DROP |
GRANT SELECT, INSERT,UPDATE,DELETE,CREATE,DROP |
||
ON grudnuk.* TO fnord; |
ON grudnuk.* TO fnord; |
||
</pre> |
|||
Dont forget to update permissions: |
Dont forget to update permissions: |
||
<pre> |
|||
FLUSH PRIVILEGES; |
FLUSH PRIVILEGES; |
||
</pre> |
Revision as of 13:44, 29 January 2005
Create a new user "fnord" with password "foobar".:
INSERT INTO mysql.user (user, host, password) VALUES ('fnord', 'localhost', PASSWORD('foobar'));
Create a new database "grudnuk":
CREATE DATABASE grudnuk;
Give permissions to the user "fnord" on all tables of the db "grudnuk":
GRANT SELECT, INSERT,UPDATE,DELETE,CREATE,DROP ON grudnuk.* TO fnord;
Dont forget to update permissions:
FLUSH PRIVILEGES;