You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,9 @@ Note: in order to migrate a table on the master you don't need to _connect_ to t
69
69
Originally this was named `gh-osc`: GitHub Online Schema Change, in the likes of [Facebook online schema change](https://www.facebook.com/notes/mysql-at-facebook/online-schema-change-for-mysql/430801045932/) and [pt-online-schema-change](https://www.percona.com/doc/percona-toolkit/2.2/pt-online-schema-change.html).
70
70
71
71
But then a rare genetic mutation happened, and the `s` transformed into `t`. And that sent us down the path of trying to figure out a new acronym. Right now, `gh-ost` (pronounce: _Ghost_), stands for:
Copy file name to clipboardExpand all lines: doc/cheatsheet.md
+16-3Lines changed: 16 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
6
6
`gh-ost` operates by connecting to potentially multiple servers, as well as imposing itself as a replica in order to streamline binary log events directly from one of those servers. There are various operation modes, which depend on your setup, configuration, and where you want to run the migration.
7
7
8
-
#####a. Connect to replica, migrate on master
8
+
### a. Connect to replica, migrate on master
9
9
10
10
This is the mode `gh-ost` expects by default. `gh-ost` will investigate the replica, crawl up to find the topology's master, and will hook onto it as well. Migration will:
11
11
@@ -46,7 +46,7 @@ gh-ost \
46
46
With `--execute`, migration actually copies data and flips tables. Without it this is a `noop` run.
47
47
48
48
49
-
#####b. Connect to master
49
+
### b. Connect to master
50
50
51
51
If you don't have replicas, or do not wish to use them, you are still able to operate directly on the master. `gh-ost` will do all operations directly on the master. You may still ask it to be considerate of replication lag.
52
52
@@ -78,7 +78,7 @@ gh-ost \
78
78
[--execute]
79
79
```
80
80
81
-
#####c. Migrate/test on replica
81
+
### c. Migrate/test on replica
82
82
83
83
This will perform a migration on the replica. `gh-ost` will briefly connect to the master but will thereafter perform all operations on the replica without modifying anything on the master.
84
84
Throughout the operation, `gh-ost` will throttle such that the replica is up to date.
@@ -92,6 +92,7 @@ Test on replica cheatsheet:
92
92
gh-ost \
93
93
--user="gh-ost" \
94
94
--password="123456" \
95
+
--host=replica.with.rbr.com \
95
96
--test-on-replica \
96
97
--database="my_schema" \
97
98
--table="my_table" \
@@ -108,3 +109,15 @@ gh-ost \
108
109
--panic-flag-file=/tmp/gh-ost.panic.flag \
109
110
--execute
110
111
```
112
+
113
+
### cnf file
114
+
115
+
You may use a `cnf` file in the following format:
116
+
117
+
```
118
+
[client]
119
+
user=gh-ost
120
+
password=123456
121
+
```
122
+
123
+
You may then remove `--user=gh-ost --password=123456` and specify `--conf=/path/to/config/file.cnf`
0 commit comments