How to add local Mysql user for Rails Dev?

I have a problem where I always need to give easy access to my local account and I don't want to deal with the typical root password a million times on my local machine. How do I provide perms so that I can type "mysql" with my local user and access everything?

0


source to share


2 answers


This gives the local user the ability to use the perms devms machine to select from databases and the local_rails_user account (no matter what your own) permissions to run any migrations. Just thought I'd keep 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';

      

When finished, make sure you perform a "privilege reset".

+1


source


Why not just use root? After all, this is your local machine.



There is such a thing as being paranoid.

0


source







All Articles