@@ -27,13 +27,14 @@ Not tested with MySQL 5.7 with new replication protocol improvements.
27
27
28
28
### <a name =" build-from-source " ></a >Build from source
29
29
30
- ``` bash
31
- git clone https://github.com/tarantool/mysql-tarantool-replication.git mysql_tarantool-replication
32
- cd mysql-tarantool-replication
33
- git submodule update --init --recursive
34
- cmake .
35
- make
36
- ```
30
+ ```
31
+ bash
32
+ git clone https://github.com/tarantool/mysql-tarantool-replication.git mysql_tarantool-replication
33
+ cd mysql-tarantool-replication
34
+ git submodule update --init --recursive
35
+ cmake .
36
+ make
37
+ ```
37
38
38
39
[ Back to contents] ( #contents )
39
40
42
43
43
44
1 . Set the ` binlog_format ` to ` ROW ` .<br >
44
45
That can be done by editing the MySQL configuration file at ` /etc/mysql/my.cnf ` :
45
-
46
- ```
47
- binlog_format = ROW
48
- ```
46
+ ```
47
+ binlog_format = ROW
48
+ ```
49
49
50
50
2 . Create a user for replication, for example:
51
-
52
- ```
53
- CREATE USER <username>@'<host>' IDENTIFIED BY '<password>';
54
- ```
51
+ ```
52
+ CREATE USER <username>@'<host>' IDENTIFIED BY '<password>';
53
+ ```
55
54
56
55
3 . Grant replication privileges to the new user:
57
-
58
- ```
59
- GRANT REPLICATION CLIENT ON '<db>'.'<table>' TO <username>@'<domain>';
60
- GRANT REPLICATION SLAVE ON '<db>'.'<table>' TO <username>@'<domain>';
61
- GRANT SELECT ON '<db>'.'<table>' TO <username>@'<domain>';
62
- ```
63
-
56
+ ```
57
+ GRANT REPLICATION CLIENT ON '<db>'.'<table>' TO <username>@'<domain>';
58
+ GRANT REPLICATION SLAVE ON '<db>'.'<table>' TO <username>@'<domain>';
59
+ GRANT SELECT ON '<db>'.'<table>' TO <username>@'<domain>';
60
+ ```
64
61
> ** Note** : you can use an asterisk (\* ) as a wildcard instead of specifying a database and a table.
65
62
66
63
4 . Flush the changes:
67
-
68
- ```
69
- FLUSH PRIVILEGES
70
- ```
64
+ ```
65
+ FLUSH PRIVILEGES
66
+ ```
71
67
72
68
[ Back to contents] ( #contents )
73
69
0 commit comments