tags:

views:

55

answers:

2

I have a problem where I always need to give simple access to my local account, and don't want to deal with typing in my root password a million times on my local machine. How do I give perms so i can type 'mysql' with my local user and get access to everything?

A: 

Why not just use root? This is your local machine, after all.

There is such a thing as being too paranoid.

brian
+1  A: 

This gives the local user to the dev machine perms to select from databases, and a local_rails_user account (feel free to sub your own) permissions to run any migrations. Just thought i'd store it here in case anyone else wants to use it. NOT FOR PRODUCTION MACHINES.

Local Rails User:

insert into user(host,user,password) values ('localhost','local_rails_user','');
grant SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD on *.* to
   'local_rails_user'@'localhost';

Local Viewer:

insert into user(host,user,password) values ('localhost','','');
grant SELECT on *.* to ''@'localhost';

Make sure to "flush privileges" after you're done.

aronchick