Skip to content

Commit 3487f1d

Browse files
committed
mentioning special meaning of 'localhost' - fixes ps0uth#58
1 parent b05c865 commit 3487f1d

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

README.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Looking for help?
8585
-f FILE, --file FILE Location of configuration file (default:
8686
mysql2pgsql.yml). If none exists at that path,
8787
one will be created for you.
88-
88+
8989

9090
Don't worry if this is your first time, it'll be gentle.
9191

@@ -101,8 +101,11 @@ to edit. For the impatient, here is what the file contains.
101101

102102
::
103103

104-
# if a socket is specified we will use that
105-
# if tcp is chosen you can use compression
104+
# a socket connection will be selected if a 'socket' is specified
105+
# also 'localhost' is a special 'hostname' for MySQL that overrides the 'port' option
106+
# and forces it to use a local socket connection
107+
# if tcp is chosen, you can use compression
108+
106109
mysql:
107110
hostname: localhost
108111
port: 3306

mysql2pgsql/lib/config.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ def reset_configfile(self, file_path):
3737
f.write(CONFIG_TEMPLATE)
3838

3939
CONFIG_TEMPLATE = """
40-
# if a socket is specified we will use that
41-
# if tcp is chosen you can use compression
40+
# a socket connection will be selected if a 'socket' is specified
41+
# also 'localhost' is a special 'hostname' for MySQL that overrides the 'port' option
42+
# and forces it to use a local socket connection
43+
# if tcp is chosen, you can use compression
44+
4245
mysql:
4346
hostname: localhost
4447
port: 3306

0 commit comments

Comments
 (0)