Improve docs for connection strings.

Some parts of the connection strings might be provided from the
environment, such as in the MySQL case. Fix #485.
This commit is contained in:
Dimitri Fontaine 2016-12-03 15:51:39 +01:00
parent 6eef0c6c00
commit db9fa2f001
2 changed files with 15 additions and 3 deletions

View File

@ -1819,11 +1819,14 @@ The \fBdatabase\fR command accepts the following clauses and options:
\fIFROM\fR \fIFROM\fR
. .
.IP .IP
Must be a connection URL pointing to a MySQL database\. At the moment only MySQL is supported as a pgloader source\. Must be a connection URL pointing to a MySQL database\.
. .
.IP .IP
If the connection URI contains a table name, then only this table is migrated from MySQL to PostgreSQL\. If the connection URI contains a table name, then only this table is migrated from MySQL to PostgreSQL\.
. .
.IP
See the \fBSOURCE CONNECTION STRING\fR section above for details on how to write the connection string\. Environment variables described in \fIhttp://dev\.mysql\.com/doc/refman/5\.0/en/environment\-variables\.html\fR can be used as default values too\. If the user is not provided, then it defaults to \fBUSER\fR environment variable value\. The password can be provided with the environment variable \fBMYSQL_PWD\fR\. The host can be provided with the environment variable \fBMYSQL_HOST\fR and otherwise defaults to \fBlocalhost\fR\. The port can be provided with the environment variable \fBMYSQL_TCP_PORT\fR and otherwise defaults to \fB3306\fR\.
.
.IP "\(bu" 4 .IP "\(bu" 4
\fIWITH\fR \fIWITH\fR
. .

View File

@ -1555,12 +1555,21 @@ The `database` command accepts the following clauses and options:
- *FROM* - *FROM*
Must be a connection URL pointing to a MySQL database. At the moment Must be a connection URL pointing to a MySQL database.
only MySQL is supported as a pgloader source.
If the connection URI contains a table name, then only this table is If the connection URI contains a table name, then only this table is
migrated from MySQL to PostgreSQL. migrated from MySQL to PostgreSQL.
See the `SOURCE CONNECTION STRING` section above for details on how to
write the connection string. Environment variables described in
<http://dev.mysql.com/doc/refman/5.0/en/environment-variables.html> can
be used as default values too. If the user is not provided, then it
defaults to `USER` environment variable value. The password can be
provided with the environment variable `MYSQL_PWD`. The host can be
provided with the environment variable `MYSQL_HOST` and otherwise
defaults to `localhost`. The port can be provided with the environment
variable `MYSQL_TCP_PORT` and otherwise defaults to `3306`.
- *WITH* - *WITH*
When loading from a `MySQL` database, the following options are When loading from a `MySQL` database, the following options are