Skip to content

Commit 92c3899

Browse files
Add notes on dependencies, better var notes (#10)
* Add notes on dependencies, better var notes * Formatting
1 parent 06a7220 commit 92c3899

File tree

1 file changed

+50
-3
lines changed

1 file changed

+50
-3
lines changed

README.md

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@ After you have Ash installed, run either one of these two commands depending on
1717

1818
You can optionally install this globally by adding `--global` to the end of the command.
1919

20+
## Dependencies
21+
22+
The external dependencies for this module you likely already have:
23+
24+
#### MySQL Driver
25+
26+
For the MySQL driver, the [MySQL Command Line Tool](http://dev.mysql.com/doc/refman/5.7/en/mysql.html) is required.
27+
28+
#### PostgreSQL Driver
29+
30+
For the PostgreSQL driver, [psql](https://www.postgresql.org/docs/9.1/static/app-psql.html) is required.
31+
2032
## Environment Variables
2133

2234
Before jumping into using this library, you're going to have to set some environment variables so SQL knows how to connect to your database.
@@ -28,30 +40,65 @@ I would recommend creating a `.env` file and sourcing it into your project.
2840
Here is a list of all of the configurable values, if you plan on using the PostgreSQL driver. The values that I have set below are the defaults (so if your needs match the defaults, feel free to exclude them).
2941

3042
```sh
43+
# The location of your psql command. If psql is already in
44+
# your $PATH (which it probably is), no need to edit this value.
45+
# In the event this isn't already in your path, I recommend putting
46+
# this value into your ~/.ashrc file.
3147
SQL_POSTGRES_PATH='psql'
48+
49+
# The PostgreSQL user you will connect with.
50+
# Note there is no password environment variable:
51+
# you must use the ~/.pgpass file.
3252
SQL_POSTGRES_USER='postgres'
53+
54+
# The host of your database.
3355
SQL_POSTGRES_HOST='localhost'
56+
57+
# The port of your database.
3458
SQL_POSTGRES_PORT='5432'
59+
60+
# The name of your database.
3561
SQL_POSTGRES_DATABASE_NAME=''
3662
```
3763

38-
You must use a [pgpass file](https://www.postgresql.org/docs/9.3/static/libpq-pgpass.html) for the PostgreSQL driver.
64+
> You must use a [pgpass file](https://www.postgresql.org/docs/9.3/static/libpq-pgpass.html) for the PostgreSQL driver.
3965
4066
### MySQL
4167

4268
Here is a list of all of the configurable values, if you plan on using the MySQL driver. The values that I have set below are the defaults (so if your needs match the defaults, feel free to exclude them).
4369

4470
```sh
71+
# The location of your mysql command. If mysql is already in
72+
# your $PATH (which it probably is), no need to edit this value.
73+
# In the event this isn't already in your path, I recommend putting
74+
# this value into your ~/.ashrc file.
4575
SQL_MYSQL_PATH='mysql'
76+
77+
# The MySQL user you will connect with.
4678
SQL_MYSQL_USER='root'
79+
80+
# The MySQL users password you will connect with.
81+
SQL_MYSQL_PASSWORD=''
82+
83+
# The host of your database.
4784
SQL_MYSQL_HOST='localhost'
85+
86+
# The port of your database.
4887
SQL_MYSQL_PORT='3306'
88+
89+
# The name of your database.
4990
SQL_MYSQL_DATABASE_NAME=''
50-
SQL_MYSQL_PASSWORD=''
91+
92+
# The location where this library will temporarily create a
93+
# MySQL config file.
94+
# http://dev.mysql.com/doc/refman/5.7/en/option-files.html
95+
# It is pretty unlikely you will want to change this, but in the
96+
# event you need to change this, I recommend putting this value
97+
# into your ~/.ashrc file.
5198
SQL_MYSQL_CONFIG_FILE='/tmp/ash_sql_mysql_config.cnf'
5299
```
53100

54-
You must have write access to `SQL_MYSQL_CONFIG_FILE`s directory. You most likely won't ever have to change that (so just exclude it), but I've added it as configurable in the event you are on an operating system without a `/tmp` directory.
101+
> You must have write access to `SQL_MYSQL_CONFIG_FILE`s directory. You most likely won't ever have to change that (so just exclude it), but I've added it as configurable in the event you are on an operating system without a `/tmp` directory.
55102
56103
## Usage
57104

0 commit comments

Comments
 (0)