This repository has been archived by the owner on Jul 26, 2022. It is now read-only.
forked from facebook/mysql-5.6
-
Notifications
You must be signed in to change notification settings - Fork 13
/
INSTALL-SOURCE
9361 lines (7728 loc) · 387 KB
/
INSTALL-SOURCE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Chapter 2 Installing and Upgrading MySQL
This chapter describes how to obtain and install MySQL. A
summary of the procedure follows and later sections provide
the details. If you plan to upgrade an existing version of
MySQL to a newer version rather than install MySQL for the
first time, see Section 2.11.1, "Upgrading MySQL," for
information about upgrade procedures and about issues that
you should consider before upgrading.
If you are interested in migrating to MySQL from another
database system, you may wish to read Section A.8, "MySQL 5.6
FAQ: Migration," which contains answers to some common
questions concerning migration issues.
Installation of MySQL generally follows the steps outlined
here:
1. Determine whether MySQL runs and is supported on your
platform.
Please note that not all platforms are equally suitable
for running MySQL, and that not all platforms on which
MySQL is known to run are officially supported by Oracle
Corporation:
2. Choose which distribution to install.
Several versions of MySQL are available, and most are
available in several distribution formats. You can choose
from pre-packaged distributions containing binary
(precompiled) programs or source code. When in doubt, use
a binary distribution. We also provide public access to
our current source tree for those who want to see our
most recent developments and help us test new code. To
determine which version and type of distribution you
should use, see Section 2.1.1, "Which MySQL Version and
Distribution to Install."
3. Download the distribution that you want to install.
For instructions, see Section 2.1.2, "How to Get MySQL."
To verify the integrity of the distribution, use the
instructions in Section 2.1.3, "Verifying Package
Integrity Using MD5 Checksums or GnuPG."
4. Install the distribution.
To install MySQL from a binary distribution, use the
instructions in Section 2.2, "Installing MySQL on
Unix/Linux Using Generic Binaries."
To install MySQL from a source distribution or from the
current development source tree, use the instructions in
Section 2.9, "Installing MySQL from Source."
5. Perform any necessary postinstallation setup.
After installing MySQL, see Section 2.10,
"Postinstallation Setup and Testing" for information
about making sure the MySQL server is working properly.
Also refer to the information provided in Section 2.10.4,
"Securing the Initial MySQL Accounts." This section
describes how to secure the initial MySQL user accounts,
which have no passwords until you assign passwords. The
section applies whether you install MySQL using a binary
or source distribution.
6. If you want to run the MySQL benchmark scripts, Perl
support for MySQL must be available. See Section 2.13,
"Perl Installation Notes."
Instructions for installing MySQL on different platforms and
environments is available on a platform by platform basis:
* Unix, Linux, FreeBSD
For instructions on installing MySQL on most Linux and
Unix platforms using a generic binary (for example, a
.tar.gz package), see Section 2.2, "Installing MySQL on
Unix/Linux Using Generic Binaries."
For information on building MySQL entirely from the
source code distributions or the source code
repositories, see Section 2.9, "Installing MySQL from
Source"
For specific platform help on installation,
configuration, and building from source see the
corresponding platform section:
+ Linux, including notes on distribution specific
methods, see Section 2.5, "Installing MySQL on
Linux."
+ Solaris and OpenSolaris, including PKG and IPS
formats, see Section 2.7, "Installing MySQL on
Solaris and OpenSolaris."
+ IBM AIX, see Section 2.7, "Installing MySQL on
Solaris and OpenSolaris."
+ FreeBSD, see Section 2.8, "Installing MySQL on
FreeBSD."
* Microsoft Windows
For instructions on installing MySQL on Microsoft
Windows, using either the MySQL Installer or Zipped
binary, see Section 2.3, "Installing MySQL on Microsoft
Windows."
For information about managing MySQL instances, see
Section 2.3.4, "MySQL Notifier."
For details and instructions on building MySQL from
source code using Microsoft Visual Studio, see Section
2.9, "Installing MySQL from Source."
* OS X
For installation on OS X, including using both the binary
package and native PKG formats, see Section 2.4,
"Installing MySQL on OS X."
For information on making use of an OS X Launch Daemon to
automatically start and stop MySQL, see Section 2.4.3,
"Installing a MySQL Launch Daemon."
For information on the MySQL Preference Pane, see Section
2.4.5, "Installing and Using the MySQL Preference Pane."
2.1 General Installation Guidance
The immediately following sections contain the information
necessary to choose, download, and verify your distribution.
The instructions in later sections of the chapter describe
how to install the distribution that you choose. For binary
distributions, see the instructions at Section 2.2,
"Installing MySQL on Unix/Linux Using Generic Binaries" or
the corresponding section for your platform if available. To
build MySQL from source, use the instructions in Section 2.9,
"Installing MySQL from Source."
2.1.1 Which MySQL Version and Distribution to Install
MySQL is available on a number of operating systems and
platforms. For information about those platforms that are
officially supported, see
http://www.mysql.com/support/supportedplatforms/database.html
on the MySQL Web site.
When preparing to install MySQL, you should decide which
version to use, and which distribution format (binary or
source) to use for the installation.
First, decide if you want to install a development release or
a GA release. Development releases have the newest features,
but are not recommended for production use. GA (General
Availability) releases, also called production or stable
releases, are meant for production use. We recommend to use
the most recent GA release.
The naming scheme in MySQL 5.6 uses release names that
consist of three numbers and a suffix; for example,
mysql-5.6.1-m1. The numbers within the release name are
interpreted as follows:
* The first number (5) is the major version and describes
the file format. All MySQL 5 releases have the same file
format.
* The second number (6) is the release level. Taken
together, the major version and release level constitute
the release series number.
* The third number (1) is the version number within the
release series. This is incremented for each new release.
Usually you want the latest version for the series you
have chosen.
For each minor update, the last number in the version string
is incremented. When there are major new features or minor
incompatibilities with previous versions, the second number
in the version string is incremented. When the file format
changes, the first number is increased.
Release names can also include a suffix that indicates the
stability level of the release. Releases within a series
progress through a set of suffixes to indicate how the
stability level improves. The possible suffixes are:
* If there is no suffix, it indicates that the release is a
General Availability (GA) or Production release. GA
releases are stable, having successfully passed through
all earlier release stages and are believed to be
reliable, free of serious bugs, and suitable for use in
production systems. Only critical bugfixes are applied to
the release.
* mN (for example, m1, m2, m3, ...) indicate a milestone
number. MySQL development uses a milestone model, in
which each milestone proceeds through a small number of
versions with a tight focus on a small subset of
thoroughly tested features. Following the releases for
one milestone, development proceeds with another small
number of releases that focuses on the next small set of
features, also thoroughly tested. Features within
milestone releases may be considered to be of
pre-production quality.
* rc indicates a Release Candidate. Release candidates are
believed to be stable, having passed all of MySQL's
internal testing, and with all known fatal runtime bugs
fixed. However, the release has not been in widespread
use long enough to know for sure that all bugs have been
identified. Only minor fixes are added.
Once you've chosen which MySQL version to install, you need
to decide which distribution to install for your operating
system. For most use cases, a binary distribution is the
right choice. Binary distributions are available in native
format for many platforms, such as RPM packages for Linux, or
DMG packages for OS X. Distributions are also available in
more generic formats such as Zip archives or compressed tar
files. On Windows, you can use the MySQL Installer to install
a binary distribution.
Under some circumstances, you may be better off installing
MySQL from a source distribution:
* You want to install MySQL at some explicit location. The
standard binary distributions are ready to run at any
installation location, but you might require even more
flexibility to place MySQL components where you want.
* You want to configure mysqld to ensure that features are
available that might not be included in the standard
binary distributions. Here is a list of the most common
extra options that you may want to use to ensure feature
availability:
+ -DWITH_LIBWRAP=1 for TCP wrappers support.
+ -DWITH_ZLIB={system|bundled} for features that
depend on compression
+ -DWITH_DEBUG=1 for debugging support
For additional information, see Section 2.9.4, "MySQL
Source-Configuration Options."
* You want to configure mysqld without some features that
are included in the standard binary distributions. For
example, distributions normally are compiled with support
for all character sets. If you want a smaller MySQL
server, you can recompile it with support for only the
character sets you need.
* You want to use the latest sources from one of the Git
repositories to have access to all current bugfixes. For
example, if you have found a bug and reported it to the
MySQL development team, the bugfix is committed to the
source repository and you can access it there. The bugfix
does not appear in a release until a release actually is
issued.
* You want to read (or modify) the C and C++ code that
makes up MySQL. For this purpose, you should get a source
distribution.
* Source distributions contain more tests and examples than
binary distributions.
2.1.2 How to Get MySQL
Check our downloads page at http://dev.mysql.com/downloads/
for information about the current version of MySQL and for
downloading instructions. For a complete up-to-date list of
MySQL download mirror sites, see
http://dev.mysql.com/downloads/mirrors.html. You can also
find information there about becoming a MySQL mirror site and
how to report a bad or out-of-date mirror.
For RPM-based Linux platforms that use Yum as their package
management system, MySQL can be installed using the MySQL Yum
Repository (http://dev.mysql.com/downloads/repo/yum/). See
Section 2.5.1, "Installing MySQL on Linux Using the MySQL Yum
Repository" for details.
For a number of Debian-based Linux platforms, such as Ubuntu,
MySQL can be installed using the MySQL APT Repository
(http://dev.mysql.com/downloads/repo/apt/). See Section
2.5.3, "Installing MySQL on Linux Using the MySQL APT
Repository" for details.
For SUSE Linux Enterprise Server (SLES) platforms, MySQL can
be installed using the MySQL SLES Repository
(http://dev.mysql.com/downloads/repo/suse/). See Section
2.5.4, "Installing MySQL on Linux Using the MySQL SLES
Repository" for details.
To obtain the latest development source, see Section 2.9.3,
"Installing MySQL Using a Development Source Tree."
2.1.3 Verifying Package Integrity Using MD5 Checksums or GnuPG
After you have downloaded the MySQL package that suits your
needs and before you attempt to install it, you should make
sure that it is intact and has not been tampered with. There
are three means of integrity checking:
* MD5 checksums
* Cryptographic signatures using GnuPG, the GNU Privacy
Guard
* For RPM packages, the built-in RPM integrity verification
mechanism
The following sections describe how to use these methods.
If you notice that the MD5 checksum or GPG signatures do not
match, first try to download the respective package one more
time, perhaps from another mirror site.
2.1.3.1 Verifying the MD5 Checksum
After you have downloaded a MySQL package, you should make
sure that its MD5 checksum matches the one provided on the
MySQL download pages. Each package has an individual checksum
that you can verify against the package that you downloaded.
The correct MD5 checksum is listed on the downloads page for
each MySQL product, and you will compare it against the MD5
checksum of the file (product) that you download.
Each operating system and setup offers its own version of
tools for checking the MD5 checksum. Typically the command is
named md5sum, or it may be named md5, and some operating
systems do not ship it at all. On Linux, it is part of the
GNU Text Utilities package, which is available for a wide
range of platforms. You can also download the source code
from http://www.gnu.org/software/textutils/. If you have
OpenSSL installed, you can use the command openssl md5
package_name instead. A Windows implementation of the md5
command line utility is available from
http://www.fourmilab.ch/md5/. winMd5Sum is a graphical MD5
checking tool that can be obtained from
http://www.nullriver.com/index/products/winmd5sum. Our
Microsoft Windows examples will assume the name md5.exe.
Linux and Microsoft Windows examples:
shell> md5sum mysql-standard-5.6.25-linux-i686.tar.gz
aaab65abbec64d5e907dcd41b8699945 mysql-standard-5.6.25-linux-i686.tar
.gz
shell> md5.exe mysql-installer-community-5.6.25.msi
aaab65abbec64d5e907dcd41b8699945 mysql-installer-community-5.6.25.msi
You should verify that the resulting checksum (the string of
hexadecimal digits) matches the one displayed on the download
page immediately below the respective package.
Note
Make sure to verify the checksum of the archive file (for
example, the .zip, .tar.gz, or .msi file) and not of the
files that are contained inside of the archive. In other
words, verify the file before extracting its contents.
2.1.3.2 Signature Checking Using GnuPG
Another method of verifying the integrity and authenticity of
a package is to use cryptographic signatures. This is more
reliable than using MD5 checksums, but requires more work.
We sign MySQL downloadable packages with GnuPG (GNU Privacy
Guard). GnuPG is an Open Source alternative to the well-known
Pretty Good Privacy (PGP) by Phil Zimmermann. See
http://www.gnupg.org/ for more information about GnuPG and
how to obtain and install it on your system. Most Linux
distributions ship with GnuPG installed by default. For more
information about GnuPG, see http://www.openpgp.org/.
To verify the signature for a specific package, you first
need to obtain a copy of our public GPG build key, which you
can download from http://pgp.mit.edu/. The key that you want
to obtain is named [email protected]. Alternatively,
you can cut and paste the key directly from the following
text:
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.9 (SunOS)
mQGiBD4+owwRBAC14GIfUfCyEDSIePvEW3SAFUdJBtoQHH/nJKZyQT7h9bPlUWC3
RODjQReyCITRrdwyrKUGku2FmeVGwn2u2WmDMNABLnpprWPkBdCk96+OmSLN9brZ
fw2vOUgCmYv2hW0hyDHuvYlQA/BThQoADgj8AW6/0Lo7V1W9/8VuHP0gQwCgvzV3
BqOxRznNCRCRxAuAuVztHRcEAJooQK1+iSiunZMYD1WufeXfshc57S/+yeJkegNW
hxwR9pRWVArNYJdDRT+rf2RUe3vpquKNQU/hnEIUHJRQqYHo8gTxvxXNQc7fJYLV
K2HtkrPbP72vwsEKMYhhr0eKCbtLGfls9krjJ6sBgACyP/Vb7hiPwxh6rDZ7ITnE
kYpXBACmWpP8NJTkamEnPCia2ZoOHODANwpUkP43I7jsDmgtobZX9qnrAXw+uNDI
QJEXM6FSbi0LLtZciNlYsafwAPEOMDKpMqAK6IyisNtPvaLd8lH0bPAnWqcyefep
rv0sxxqUEMcM3o7wwgfN83POkDasDbs3pjwPhxvhz6//62zQJ7Q2TXlTUUwgUmVs
ZWFzZSBFbmdpbmVlcmluZyA8bXlzcWwtYnVpbGRAb3NzLm9yYWNsZS5jb20+iGkE
ExECACkCGyMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAIZAQUCUwHUZgUJGmbLywAK
CRCMcY07UHLh9V+DAKCjS1gGwgVI/eut+5L+l2v3ybl+ZgCcD7ZoA341HtoroV3U
6xRD09fUgeq0O015U1FMIFBhY2thZ2Ugc2lnbmluZyBrZXkgKHd3dy5teXNxbC5j
b20pIDxidWlsZEBteXNxbC5jb20+iG8EMBECAC8FAk53Pa0oHSBidWlsZEBteXNx
bC5jb20gd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PEb/O9Rkb
f4fmLe11EzIaCa4PqARXQZc4dhSinMt6K3X4BrRsKTfozBu74F47D8Ilbf5vSYHb
uE5p/1oIDznkg/p8kW+3FxuWrycciqFTcNz215yyX39LXFnlLzKUb/F5GwADBQf+
Lwqqa8CGrRfsOAJxim63CHfty5mUc5rUSnTslGYEIOCR1BeQauyPZbPDsDD9MZ1Z
aSafanFvwFG6Llx9xkU7tzq+vKLoWkm4u5xf3vn55VjnSd1aQ9eQnUcXiL4cnBGo
TbOWI39EcyzgslzBdC++MPjcQTcA7p6JUVsP6oAB3FQWg54tuUo0Ec8bsM8b3Ev4
2LmuQT5NdKHGwHsXTPtl0klk4bQk4OajHsiy1BMahpT27jWjJlMiJc+IWJ0mghkK
Ht926s/ymfdf5HkdQ1cyvsz5tryVI3Fx78XeSYfQvuuwqp2H139pXGEkg0n6KdUO
etdZWhe70YGNPw1yjWJT1IhUBBgRAgAMBQJOdz3tBQkT+wG4ABIHZUdQRwABAQkQ
jHGNO1By4fUUmwCbBYr2+bBEn/L2BOcnw9Z/QFWuhRMAoKVgCFm5fadQ3Afi+UQl
AcOphrnJ
=443I
-----END PGP PUBLIC KEY BLOCK-----
To import the build key into your personal public GPG
keyring, use gpg --import. For example, if you have saved the
key in a file named mysql_pubkey.asc, the import command
looks like this:
shell> gpg --import mysql_pubkey.asc
gpg: key 5072E1F5: public key "MySQL Release Engineering
<[email protected]>" imported
gpg: Total number processed: 1
gpg: imported: 1
gpg: no ultimately trusted keys found
You can also download the key from the public keyserver using
the public key id, 5072E1F5:
shell> gpg --recv-keys 5072E1F5
gpg: requesting key 5072E1F5 from hkp server keys.gnupg.net
gpg: key 5072E1F5: "MySQL Release Engineering <[email protected].
com>"
1 new user ID
gpg: key 5072E1F5: "MySQL Release Engineering <[email protected].
com>"
53 new signatures
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: new user IDs: 1
gpg: new signatures: 53
If you want to import the key into your RPM configuration to
validate RPM install packages, you should be able to import
the key directly:
shell> rpm --import mysql_pubkey.asc
If you experience problems or require RPM specific
information, see Section 2.1.3.4, "Signature Checking Using
RPM."
After you have downloaded and imported the public build key,
download your desired MySQL package and the corresponding
signature, which also is available from the download page.
The signature file has the same name as the distribution file
with an .asc extension, as shown by the examples in the
following table.
Table 2.1 MySQL Package and Signature Files for Source files
File Type File Name
Distribution file mysql-standard-5.6.25-linux-i686.tar.gz
Signature file mysql-standard-5.6.25-linux-i686.tar.gz.asc
Make sure that both files are stored in the same directory
and then run the following command to verify the signature
for the distribution file:
shell> gpg --verify package_name.asc
If the downloaded package is valid, you will see a "Good
signature" similar to:
shell> gpg --verify mysql-standard-5.6.25-linux-i686.tar.gz.asc
gpg: Signature made Tue 01 Feb 2011 02:38:30 AM CST using DSA key ID 5
072E1F5
gpg: Good signature from "MySQL Release Engineering <[email protected]
racle.com>"
The Good signature message indicates that the file signature
is valid, when compared to the signature listed on our site.
But you might also see warnings, like so:
shell> gpg --verify mysql-standard-5.6.25-linux-i686.tar.gz.asc
gpg: Signature made Wed 23 Jan 2013 02:25:45 AM PST using DSA key ID 5
072E1F5
gpg: checking the trustdb
gpg: no ultimately trusted keys found
gpg: Good signature from "MySQL Release Engineering <[email protected]
racle.com>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the
owner.
Primary key fingerprint: A4A9 4068 76FC BD3C 4567 70C8 8C71 8D3B 5072
E1F5
That is normal, as they depend on your setup and
configuration. Here are explanations for these warnings:
* gpg: no ultimately trusted keys found: This means that
the specific key is not "ultimately trusted" by you or
your web of trust, which is okay for the purposes of
verifying file signatures.
* This key is not certified with a trusted signature! There
is no indication that the signature belongs to the
owner.: This refers to your level of trust in your belief
that you possess our real public key. This is a personal
decision. Ideally, a MySQL developer would hand you the
key in person, but more commonly, you downloaded it. Was
the download tampered with? Probably not, but this
decision is up to you. Setting up a web of trust is one
method for trusting them.
See the GPG documentation for more information on how to work
with public keys.
2.1.3.3 Signature Checking Using Gpg4win for Windows
The Section 2.1.3.2, "Signature Checking Using GnuPG" section
describes how to verify MySQL downloads using GPG. That guide
also applies to Microsoft Windows, but another option is to
use a GUI tool like Gpg4win (http://www.gpg4win.org/). You
may use a different tool but our examples are based on
Gpg4win, and utilize its bundled Kleopatra GUI.
Download and install Gpg4win, and then load Kleopatra. The
dialog should look similar to:
Figure 2.1 Initial screen after loading Kleopatra
Initial screen after loading Kleopatra
Next, add the MySQL Release Engineering certificate. Do this
by clicking File, Lookup Certificates on Server. Type "Mysql
Release Engineering" into the search box and press Search.
Figure 2.2 Finding the MySQL Release Engineering certificate
Finding the MySQL Release Engineering certificate
Select the "MySQL Release Engineering" certificate. The
Fingerprint and Key-ID must be "5072E1F5", or choose
Details... to confirm the certificate is valid. Now, import
it by clicking Import. An import dialog will be displayed,
choose Okay, and this certificate will now be listed under
the Imported Certificates tab.
Next, configure the trust level for our certificate. Select
our certificate, then from the main menu select Certificates,
Change Owner Trust.... We suggest choosing I believe checks
are very accurate for our certificate, as otherwise you might
not be able to verify our signature. Select I believe checks
are very accurate and then press OK.
Figure 2.3 Changing the Trust level
Changing the Trust level
Next, verify the downloaded MySQL package file. This requires
files for both the packaged file, and the signature. The
signature file must have the same name as the packaged file
but with an appended .asc extension, as shown by the example
in the following table. The signature is linked to on the
downloads page for each MySQL product. You must create the
.asc file with this signature.
Table 2.2 MySQL Package and Signature Files for MySQL
Installer for Microsoft Windows
File Type File Name
Distribution file mysql-installer-community-5.6.25.msi
Signature file mysql-installer-community-5.6.25.msi.asc
Make sure that both files are stored in the same directory
and then run the following command to verify the signature
for the distribution file. Either drag and drop the signature
(.asc) file into Kleopatra, or load the dialog from File,
Decrypt/Verify Files..., and then choose either the .msi or
.asc file.
Figure 2.4 The Decrypt/Verify Files dialog
The Decrypt/Verify Files dialog
Click Decrypt/Verify to check the file. The two most common
results will look like the following, and although the yellow
warning looks problematic, the following means that the file
check passed with success. You may now run this installer.
Figure 2.5 The Decrypt/Verify Results: Good
The Decrypt/Verify Results: Good
Seeing a red "The signature is bad" error means the file is
invalid. Do not execute the MSI file if you see this error.
Figure 2.6 The Decrypt/Verify Results: Bad
The Decrypt/Verify Results: Bad
The Section 2.1.3.2, "Signature Checking Using GnuPG" section
explains why you probably don't see a green Good signature
result.
2.1.3.4 Signature Checking Using RPM
For RPM packages, there is no separate signature. RPM
packages have a built-in GPG signature and MD5 checksum. You
can verify a package by running the following command:
shell> rpm --checksig package_name.rpm
Example:
shell> rpm --checksig MySQL-server-5.6.25-0.linux_glibc2.5.i386.rpm
MySQL-server-5.6.25-0.linux_glibc2.5.i386.rpm: md5 gpg OK
Note
If you are using RPM 4.1 and it complains about (GPG) NOT OK
(MISSING KEYS: GPG#5072e1f5), even though you have imported
the MySQL public build key into your own GPG keyring, you
need to import the key into the RPM keyring first. RPM 4.1 no
longer uses your personal GPG keyring (or GPG itself).
Rather, RPM maintains a separate keyring because it is a
system-wide application and a user's GPG public keyring is a
user-specific file. To import the MySQL public key into the
RPM keyring, first obtain the key, then use rpm --import to
import the key. For example:
shell> gpg --export -a 5072e1f5 > 5072e1f5.asc
shell> rpm --import 5072e1f5.asc
Alternatively, rpm also supports loading the key directly
from a URL, and you can use this manual page:
shell> rpm --import doc/refman/5.6/en/checking-gpg-signature.html
If you need to obtain the MySQL public key, see Section
2.1.3.2, "Signature Checking Using GnuPG."
2.1.4 Installation Layouts
The installation layout differs for different installation
types (for example, native packages, binary tarballs, and
source tarballs), which can lead to confusion when managing
different systems or using different installation sources.
The individual layouts are given in the corresponding
installation type or platform chapter, as described
following. Note that the layout of installations from vendors
other than Oracle may differ from these layouts.
* Section 2.3.1, "MySQL Installation Layout on Microsoft
Windows"
* Section 2.9.1, "MySQL Layout for Source Installation"
* Section 2.2, "MySQL Installation Layout for Generic
Unix/Linux Binary Package"
* Section 2.5.5, "MySQL Installation Layout for Linux RPM
Packages from the MySQL Developer Zone"
* Section 2.4.2, "MySQL Installation Layout on OS X"
2.1.5 Compiler-Specific Build Characteristics
In some cases, the compiler used to build MySQL affects the
features available for use. The notes in this section apply
for binary distributions provided by Oracle Corporation or
that you compile yourself from source.
icc (Intel C++ Compiler) Builds
A server built with icc has these characteristics:
* SSL support is not included.
2.2 Installing MySQL on Unix/Linux Using Generic Binaries
Oracle provides a set of binary distributions of MySQL. These
include generic binary distributions in the form of
compressed tar files (files with a .tar.gz extension) for a
number of platforms, and binaries in platform-specific
package formats for selected platforms.
This section covers the installation of MySQL from a
compressed tar file binary distribution. For other
platform-specific package formats, see the other
platform-specific sections. For example, for Windows
distributions, see Section 2.3, "Installing MySQL on
Microsoft Windows."
To obtain MySQL, see Section 2.1.2, "How to Get MySQL."
MySQL compressed tar file binary distributions have names of
the form mysql-VERSION-OS.tar.gz, where VERSION is a number
(for example, 5.6.25), and OS indicates the type of operating
system for which the distribution is intended (for example,
pc-linux-i686 or winx64).
Warning
If you have previously installed MySQL using your operating
system native package management system, such as yum or
apt-get, you may experience problems installing using a
native binary. Make sure your previous MySQL installation has
been removed entirely (using your package management system),
and that any additional files, such as old versions of your
data files, have also been removed. You should also check for
configuration files such as /etc/my.cnf or the /etc/mysql
directory and delete them.
For information about replacing third-party packages with
official MySQL packages, see the related Apt guide
(http://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/) or
Yum guide.
Warning
MySQL has a dependency on the libaio library. The
mysql_install_db and subsequent mysqld_safe steps will fail
if this library is not installed locally. If necessary,
install it using the appropriate package manager. For
example, on Yum-based systems:
shell> yum search libaio # search for info
shell> yum install libaio # install library
Or, on APT-based systems:
shell> apt-cache search libaio # search for info
shell> apt-get install libaio1 # install library
If you run into problems and need to file a bug report,
please use the instructions in Section 1.7, "How to Report
Bugs or Problems."
On Unix, to install a compressed tar file binary
distribution, unpack it at the installation location you
choose (typically /usr/local/mysql). This creates the
directories shown in the following table.
Table 2.3 MySQL Installation Layout for Generic Unix/Linux
Binary Package
Directory Contents of Directory
bin, scripts mysqld server, client and utility programs
data Log files, databases
docs MySQL manual in Info format
man Unix manual pages
include Include (header) files
lib Libraries
share Miscellaneous support files, including error messages,
sample configuration files, SQL for database installation
sql-bench Benchmarks
Debug versions of the mysqld binary are available as
mysqld-debug. To compile your own debug version of MySQL from
a source distribution, use the appropriate configuration
options to enable debugging support. See Section 2.9,
"Installing MySQL from Source."
To install and use a MySQL binary distribution, the command
sequence looks like this:
shell> groupadd mysql
shell> useradd -r -g mysql mysql
shell> cd /usr/local
shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> bin/mysqld_safe --user=mysql &
# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysql.server
Note
This procedure assumes that you have root (administrator)
access to your system. Alternatively, you can prefix each
command using the sudo (Linux) or pfexec (OpenSolaris)
command.
Note
The procedure does not assign passwords to MySQL accounts. To
do so, use the instructions in Section 2.10.4, "Securing the
Initial MySQL Accounts."
As of MySQL 5.6.8, mysql_install_db creates a default option
file named my.cnf in the base installation directory. This
file is created from a template included in the distribution
package named my-default.cnf. For more information, see
Section 5.1.2.2, "Using a Sample Default Server Configuration
File."
A more detailed version of the preceding description for
installing a binary distribution follows.
Create a mysql User and Group
If your system does not already have a user and group to use
for running mysqld, you may need to create one. The following
commands add the mysql group and the mysql user. You might
want to call the user and group something else instead of
mysql. If so, substitute the appropriate name in the
following instructions. The syntax for useradd and groupadd
may differ slightly on different versions of Unix, or they
may have different names such as adduser and addgroup.
shell> groupadd mysql
shell> useradd -r -g mysql mysql
Note
Because the user is required only for ownership purposes, not
login purposes, the useradd command uses the -r option to
create a user that does not have login permissions to your
server host. Omit this option to permit logins for the user,
or if your useradd does not support the option.
Obtain and Unpack the Distribution
Pick the directory under which you want to unpack the
distribution and change location into it. The example here
unpacks the distribution under /usr/local. The instructions,
therefore, assume that you have permission to create files
and directories in /usr/local. If that directory is
protected, you must perform the installation as root.
shell> cd /usr/local
Obtain a distribution file using the instructions in Section
2.1.2, "How to Get MySQL." For a given release, binary
distributions for all platforms are built from the same MySQL
source distribution.
Unpack the distribution, which creates the installation
directory. Then create a symbolic link to that directory. tar
can uncompress and unpack the distribution if it has z option
support:
shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
shell> ln -s full-path-to-mysql-VERSION-OS mysql
The tar command creates a directory named mysql-VERSION-OS.
The ln command makes a symbolic link to that directory. This
enables you to refer more easily to the installation
directory as /usr/local/mysql.
To install MySQL from a compressed tar file binary
distribution, your system must have GNU gunzip to uncompress
the distribution and a reasonable tar to unpack it. If your
tar program supports the z option, it can both uncompress and
unpack the file.
GNU tar is known to work. The standard tar provided with some
operating systems is not able to unpack the long file names
in the MySQL distribution. You should download and install
GNU tar, or if available, use a preinstalled version of GNU
tar. Usually this is available as gnutar, gtar, or as tar
within a GNU or Free Software directory, such as /usr/sfw/bin
or /usr/local/bin. GNU tar is available from
http://www.gnu.org/software/tar/.
If your tar does not have z option support, use gunzip to
unpack the distribution and tar to unpack it. Replace the
preceding tar command with the following alternative command
to uncompress and extract the distribution:
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
Perform Postinstallation Setup
The remainder of the installation process involves setting
distribution ownership and access permissions, initializing
the data directory, starting the MySQL server, and setting up
the configuration file. For instructions, see Section 2.10,
"Postinstallation Setup and Testing."
2.3 Installing MySQL on Microsoft Windows
There are several different methods to install MySQL on
Microsoft Windows.
Simple Installation Method
The simplest and recommended method is to download MySQL
Installer (for Windows) and let it install and configure all
of the MySQL products on your system. Here is how:
* Download MySQL Installer from
http://dev.mysql.com/downloads/installer/ and execute it.
Note
Unlike the standard MySQL Installer, the smaller
"web-community" version does not bundle any MySQL
applications but it will download the MySQL products you
choose to install.
* Choose the appropriate Setup Type for your system.
Typically you will choose Developer Default to install
MySQL server and other MySQL tools related to MySQL
development, helpful tools like MySQL Workbench. Or,
choose the Custom setup type to manually select your
desired MySQL products.
Note
Multiple versions of MySQL server can exist on a single
system. You can choose one or multiple versions.
* Complete the installation process by following the MySQL
Installation wizard's instructions. This will install
several MySQL products and start the MySQL server.
* MySQL is now installed. You probably configured MySQL as
a service that will automatically start MySQL server
every time you restart your system.
Note
You probably also installed other helpful MySQL products like
MySQL Workbench and MySQL Notifier on your system. Consider
loading Chapter 26, "MySQL Workbench" to check your new MySQL
server connection, and Section 2.3.4, "MySQL Notifier" to
view the connection's status. By default, these two programs
automatically start after installing MySQL.
This process also installs the MySQL Installer application on
your system, and later you can use MySQL Installer to upgrade
or reconfigure your MySQL products.
Additional Installation Information
MySQL is available for Microsoft Windows, for both 32-bit and
64-bit versions. For supported Windows platform information,
see
http://www.mysql.com/support/supportedplatforms/database.html
.
It is possible to run MySQL as a standard application or as a
Windows service. By using a service, you can monitor and
control the operation of the server through the standard
Windows service management tools. For more information, see
Section 2.3.5.7, "Starting MySQL as a Windows Service."
Generally, you should install MySQL on Windows using an
account that has administrator rights. Otherwise, you may
encounter problems with certain operations such as editing
the PATH environment variable or accessing the Service
Control Manager. Once installed, MySQL does not need to be
executed using a user with Administrator privileges.
For a list of limitations on the use of MySQL on the Windows
platform, see Section D.10.6, "Windows Platform Limitations."
In addition to the MySQL Server package, you may need or want
additional components to use MySQL with your application or
development environment. These include, but are not limited
to:
* To connect to the MySQL server using ODBC, you must have
a Connector/ODBC driver. For more information, including
installation and configuration instructions, see MySQL
Connector/ODBC Developer Guide
(http://dev.mysql.com/doc/connector-odbc/en/index.html).
Note
MySQL Installer will install and configure Connector/ODBC