Chris Muench
Chris Muench

Reputation: 18338

Mysql Mac OS X how to NOT require password when on local machine

On my linux server the host set it up so I can do mysql -u root and I am logged in. (I have a password, but on that server my password is stored somewhere (I think?).

How do I do this for mac os x so I don't have to type my password for mysql and mysqldump

Upvotes: 1

Views: 109

Answers (1)

Phil
Phil

Reputation: 164956

Create a .my.cnf file in your home directory with the following format

[client]
user = root
password = root_password

Change the username to whatever is appropriate for your setup.

Upvotes: 1

Related Questions