Skip to content

Commit db9fa2f

Browse files
committed
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.
1 parent 6eef0c6 commit db9fa2f

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

pgloader.1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1819,11 +1819,14 @@ The \fBdatabase\fR command accepts the following clauses and options:
18191819
\fIFROM\fR
18201820
.
18211821
.IP
1822-
Must be a connection URL pointing to a MySQL database\. At the moment only MySQL is supported as a pgloader source\.
1822+
Must be a connection URL pointing to a MySQL database\.
18231823
.
18241824
.IP
18251825
If the connection URI contains a table name, then only this table is migrated from MySQL to PostgreSQL\.
18261826
.
1827+
.IP
1828+
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\.
1829+
.
18271830
.IP "\(bu" 4
18281831
\fIWITH\fR
18291832
.

pgloader.1.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,12 +1555,21 @@ The `database` command accepts the following clauses and options:
15551555

15561556
- *FROM*
15571557

1558-
Must be a connection URL pointing to a MySQL database. At the moment
1559-
only MySQL is supported as a pgloader source.
1558+
Must be a connection URL pointing to a MySQL database.
15601559

15611560
If the connection URI contains a table name, then only this table is
15621561
migrated from MySQL to PostgreSQL.
15631562

1563+
See the `SOURCE CONNECTION STRING` section above for details on how to
1564+
write the connection string. Environment variables described in
1565+
<http://dev.mysql.com/doc/refman/5.0/en/environment-variables.html> can
1566+
be used as default values too. If the user is not provided, then it
1567+
defaults to `USER` environment variable value. The password can be
1568+
provided with the environment variable `MYSQL_PWD`. The host can be
1569+
provided with the environment variable `MYSQL_HOST` and otherwise
1570+
defaults to `localhost`. The port can be provided with the environment
1571+
variable `MYSQL_TCP_PORT` and otherwise defaults to `3306`.
1572+
15641573
- *WITH*
15651574

15661575
When loading from a `MySQL` database, the following options are

0 commit comments

Comments
 (0)