MySQL User Access Setup
Setting up a database to be populated by Hibernate or some other O/R mapping tool usually requires the following inital setup when working with MySQL:
- Create the database, e.g.
mysqladmin -u root -p create foo - Create a user and grant full access to the database from any machine, e.g.
grant all on foo.* to 'homer'@'%' identified by 'simpson';
grant all on foo.* to 'homer'@'localhost' identified by 'simpson'; - You can always undo these permissions, e.g.
revoke all on foo.* from 'homer'@'%';
revoke all on foo.* from 'homer'@'localhost';
Of course, there is a ton of documentation available to grant more fine-grained privileges and much more.




0 Comments:
Post a Comment
<< Home