Skip to content

Commit

Permalink
Added bash command to get Apache user
Browse files Browse the repository at this point in the history
  • Loading branch information
econpy committed Nov 6, 2013
1 parent f6bab4d commit 060b627
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ GRANT SELECT PRIVILEGES ON *.* TO 'www-data'@'localhost';
FLUSH PRIVILEGES;
```

If you're using a Mac, the Apache user is `_www`, so replace `www-data` with `_www` above.
If you're using a Mac, the Apache user is `_www`, so replace `www-data` with `_www` above. Otherwise, you can get it from your `httpd.conf` file (located in this example at `/etc/apache2/httpd.conf`) by doing:

```bash
cat /etc/apache2/httpd.conf | grep ^User | cut -d" " -f 2
```

Finally, there must also be a file at `~/.my.cnf` that Python can load with your MySQL user/pass (this prevents having to store any sensitive information in the Python scripts). Here is an example of what the `~/.my.cnf` file would look like for the user/pass created above:

Expand Down

0 comments on commit 060b627

Please sign in to comment.