Skip to content

Instantly share code, notes, and snippets.

@garoevans
Created March 20, 2012 09:03
Show Gist options
  • Save garoevans/2133086 to your computer and use it in GitHub Desktop.
Save garoevans/2133086 to your computer and use it in GitHub Desktop.
LINUX: automated mysql access
Sometimes you want automated access for root on your MySQL database. One way of accomplishing that is by doing this:
cd /root
touch .my.cnf
chmod 640 .my.cnf
And put in it:
[client]
user=root
password=foobar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment