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
v1.7.0 - is the last tag in repo, feel free to choose what you want.
@@ -36,10 +36,10 @@ You can use it as a MySQL replica to sync binlog from master then do something,
36
36
37
37
```go
38
38
import (
39
-
"github.com/go-mysql-org/go-mysql/replication"
39
+
"github.com/instructure/mc-go-mysql/replication"
40
40
"os"
41
41
)
42
-
// Create a binlog syncer with a unique server id, the server id must be different from other MySQL's.
42
+
// Create a binlog syncer with a unique server id, the server id must be different from other MySQL's.
43
43
// flavor is mysql or mariadb
44
44
cfg:= replication.BinlogSyncerConfig {
45
45
ServerID: 100,
@@ -109,21 +109,21 @@ Schema: test
109
109
Query: DROP TABLE IF EXISTS `test_replication` /* generated by server */
110
110
```
111
111
112
-
## Canal
112
+
## Canal
113
113
114
-
Canal is a package that can sync your MySQL into everywhere, like Redis, Elasticsearch.
114
+
Canal is a package that can sync your MySQL into everywhere, like Redis, Elasticsearch.
115
115
116
-
First, canal will dump your MySQL data then sync changed data using binlog incrementally.
116
+
First, canal will dump your MySQL data then sync changed data using binlog incrementally.
117
117
118
-
You must use ROW format for binlog, full binlog row image is preferred, because we may meet some errors when primary key changed in update for minimal or noblob row image.
118
+
You must use ROW format for binlog, full binlog row image is preferred, because we may meet some errors when primary key changed in update for minimal or noblob row image.
119
119
120
120
A simple example:
121
121
122
122
```go
123
123
package main
124
124
125
125
import (
126
-
"github.com/go-mysql-org/go-mysql/canal"
126
+
"github.com/instructure/mc-go-mysql/canal"
127
127
"github.com/siddontang/go-log/log"
128
128
)
129
129
@@ -161,17 +161,17 @@ func main() {
161
161
}
162
162
```
163
163
164
-
You can see [go-mysql-elasticsearch](https://github.com/siddontang/go-mysql-elasticsearch) for how to sync MySQL data into Elasticsearch.
164
+
You can see [go-mysql-elasticsearch](https://github.com/siddontang/go-mysql-elasticsearch) for how to sync MySQL data into Elasticsearch.
165
165
166
166
## Client
167
167
168
-
Client package supports a simple MySQL connection driver which you can use it to communicate with MySQL server.
168
+
Client package supports a simple MySQL connection driver which you can use it to communicate with MySQL server.
169
169
170
170
### Example
171
171
172
172
```go
173
173
import (
174
-
"github.com/go-mysql-org/go-mysql/client"
174
+
"github.com/instructure/mc-go-mysql/client"
175
175
)
176
176
177
177
// Connect MySQL at 127.0.0.1:3306, with user root, an empty password and database test
@@ -212,7 +212,7 @@ for _, row := range r.Values {
212
212
if val.Type == mysql.FieldValueTypeFloat {
213
213
_ = val.AsFloat64() // float64
214
214
}
215
-
}
215
+
}
216
216
}
217
217
```
218
218
@@ -247,7 +247,7 @@ err := conn.ExecuteSelectStreaming(`select id, name from table LIMIT 100500`, &r
Server package supplies a framework to implement a simple MySQL server which can handle the packets from the MySQL client.
263
+
Server package supplies a framework to implement a simple MySQL server which can handle the packets from the MySQL client.
264
264
You can use it to build your own MySQL proxy. The server connection is compatible with MySQL 5.5, 5.6, 5.7, and 8.0 versions,
265
265
so that most MySQL clients should be able to connect to the Server without modifications.
266
266
@@ -275,7 +275,7 @@ import (
275
275
"log"
276
276
"net"
277
277
278
-
"github.com/go-mysql-org/go-mysql/server"
278
+
"github.com/instructure/mc-go-mysql/server"
279
279
)
280
280
281
281
funcmain() {
@@ -334,10 +334,10 @@ Failover supports to promote a new master and let replicas replicate from it aut
334
334
335
335
Failover supports MySQL >= 5.6.9 with GTID mode, if you use lower version, e.g, MySQL 5.0 - 5.5, please use [MHA](http://code.google.com/p/mysql-master-ha/) or [orchestrator](https://github.com/outbrain/orchestrator).
336
336
337
-
At the same time, Failover supports MariaDB >= 10.0.9 with GTID mode too.
337
+
At the same time, Failover supports MariaDB >= 10.0.9 with GTID mode too.
338
338
339
339
Why only GTID? Supporting failover with no GTID mode is very hard, because replicas can not find the proper binlog filename and position with the new master.
340
-
Although there are many companies use MySQL 5.0 - 5.5, I think upgrade MySQL to 5.6 or higher is easy.
340
+
Although there are many companies use MySQL 5.0 - 5.5, I think upgrade MySQL to 5.6 or higher is easy.
341
341
342
342
## Driver
343
343
@@ -349,7 +349,7 @@ package main
349
349
import (
350
350
"database/sql"
351
351
352
-
_ "github.com/go-mysql-org/go-mysql/driver"
352
+
_ "github.com/instructure/mc-go-mysql/driver"
353
353
)
354
354
355
355
funcmain() {
@@ -364,15 +364,15 @@ We pass all tests in https://github.com/bradfitz/go-sql-test using go-mysql driv
364
364
365
365
## Donate
366
366
367
-
If you like the project and want to buy me a cola, you can through:
367
+
If you like the project and want to buy me a cola, you can through:
0 commit comments