5
5
* Consistency - maintains snapshot across all threads, provides accurate master and slave log positions, etc
6
6
* Manageability - supports PCRE for specifying database and tables inclusions and exclusions
7
7
8
+ ## Dependencies for building mydumper
9
+
10
+ One needs to install development tools:
11
+ * Ubuntu or Debian:
12
+ ```
13
+ apt-get install cmake g++ git
14
+ ```
15
+ * Fedora, RedHat and CentOS:
16
+ ```
17
+ yum install -y cmake gcc gcc-c++ git make
18
+ ```
19
+ * MacOSX:
20
+ ```
21
+ port install pkgconfig cmake
22
+ ```
23
+ One needs to install development versions of GLib, ZLib and PCRE:
24
+ * Ubuntu or Debian:
25
+ ```
26
+ apt-get install libglib2.0-dev zlib1g-dev libpcre3-dev libssl-dev
27
+ ```
28
+ * Fedora, RedHat and CentOS:
29
+ ```
30
+ yum install -y glib2-devel mysql-devel openssl-devel pcre-devel zlib-devel
31
+ ```
32
+ * openSUSE:
33
+ ```
34
+ zypper install glib2-devel libmysqlclient-devel pcre-devel zlib-devel
35
+ ```
36
+ * MacOSX: port install glib2 pcre
37
+ One needs to install MySQL/Percona/MariaDB development versions:
38
+ * Ubuntu or Debian:
39
+ ```
40
+ apt-get install libmysqlclient-dev
41
+ apt-get install libperconaserverclient20-dev
42
+ apt-get install libmariadbclient-dev
43
+ ```
44
+ * Fedora, RedHat and CentOS:
45
+ ```
46
+ yum install -y mysql-devel
47
+ yum install -y Percona-Server-devel-57
48
+ yum install -y mariadb-devel
49
+ ```
50
+ CentOS 7 comes by default with MariaDB 5.5 libraries which are very old.
51
+ It might be better to download a newer version of these libraries (MariaDB, MySQL, Percona etc).
52
+ * openSUSE:
53
+ ```
54
+ zypper install libmysqlclient-devel
55
+ ```
56
+ * MacOSX: port install mysql5
57
+ (You may want to run 'port select mysql mysql5' afterwards)
58
+
59
+ # How to use mydumper
60
+
61
+ See [ Usage] ( docs/mydumper_usage.rst )
62
+
8
63
## How to install mydumper/myloader?
9
64
10
65
First get the correct url from the [ releases section] ( https://github.com/maxbube/mydumper/releases ) then:
11
66
12
67
### RedHat / Centos
13
68
14
69
``` bash
15
- yum install https://github.com/maxbube/mydumper/releases/download/v0.9.5/mydumper-0.9.5-1.el7.x86_64.rpm
70
+ yum install https://github.com/maxbube/mydumper/releases/download/v0.10.5/mydumper-0.10.5-1.el7.x86_64.rpm
71
+ yum install https://github.com/maxbube/mydumper/releases/download/v0.10.5/mydumper-0.10.5-1.el8.x86_64.rpm
16
72
```
17
73
18
74
### Ubuntu / Debian
19
75
20
76
``` bash
21
- wget https://github.com/maxbube/mydumper/releases/download/v0.9.5/mydumper_0.9.5-1.xenial_amd64.deb
22
- dpkg -i mydumper_0.9.5-1.xenial_amd64.deb
77
+ wget https://github.com/maxbube/mydumper/releases/download/v0.10.5/mydumper_0.10.5-1.$( lsb_release -cs) _amd64.deb
78
+ dpkg -i mydumper_0.10.5-1.$( lsb_release -cs) _amd64.deb
79
+ ```
80
+
81
+ ### OSX
82
+ By using [ Homebrew] ( https://brew.sh/ )
83
+
84
+ ``` bash
85
+ brew install mydumper
23
86
```
24
87
25
88
## How to build it?
@@ -31,15 +94,6 @@ cmake .
31
94
make
32
95
```
33
96
34
- One needs to install development versions of required libaries (MySQL, GLib, ZLib, PCRE):
35
- NOTE: you must use the correspondent mysql devel package.
36
-
37
- * Ubuntu or Debian: apt-get install libglib2.0-dev libmysqlclient15-dev zlib1g-dev libpcre3-dev libssl-dev
38
- * Fedora, RedHat and CentOS: yum install glib2-devel mysql-devel zlib-devel pcre-devel openssl-devel
39
- * openSUSE: zypper install glib2-devel libmysqlclient-devel pcre-devel zlib-devel
40
- * MacOSX: port install glib2 mysql5 pcre pkgconfig cmake
41
- (You may want to run 'port select mysql mysql5' afterwards)
42
-
43
97
One has to make sure, that pkg-config, mysql_config, pcre-config are all in $PATH
44
98
45
99
Binlog dump is disabled by default to compile with it you need to add -DWITH_BINLOG=ON to cmake options
@@ -51,7 +105,7 @@ To build against mysql libs < 5.7 you need to disable SSL adding -DWITH_SSL=OFF
51
105
This is all done following best MySQL practices and traditions:
52
106
53
107
* As a precaution, slow running queries on the server either abort the dump, or get killed
54
- * Global write lock is acquired ("FLUSH TABLES WITH READ LOCK")
108
+ * Global read lock is acquired ("FLUSH TABLES WITH READ LOCK")
55
109
* Various metadata is read ("SHOW SLAVE STATUS","SHOW MASTER STATUS")
56
110
* Other threads connect and establish snapshots ("START TRANSACTION WITH CONSISTENT SNAPSHOT")
57
111
** On pre-4.1.8 it creates dummy InnoDB table, and reads from it.
0 commit comments