forked from hhyo/inception
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL-SOURCE
6845 lines (5616 loc) · 297 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 B.8, "MySQL 5.6 FAQ:
Migration," which contains answers to some common questions
concerning migration issues.
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.2, "Choosing Which MySQL Distribution to Install."
3. Download the distribution that you want to install.
For instructions, see Section 2.1.3, "How to Get MySQL." To
verify the integrity of the distribution, use the instructions
in Section 2.1.4, "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 from Generic
Binaries on Unix/Linux."
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, read Section 2.10, "Postinstallation
Setup and Testing." This section contains important
information about making sure the MySQL server is working
properly. It also 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 from Generic
Binaries on Unix/Linux."
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.6, "Installing MySQL on Solaris and
OpenSolaris."
+ IBM AIX, see Section 2.6, "Installing MySQL on Solaris
and OpenSolaris."
+ Hewlett-Packard HP-UX, including the DEPOT package
format, see Section 2.7, "Installing MySQL on HP-UX."
+ FreeBSD, see Section 2.8, "Installing MySQL on FreeBSD."
* Microsoft Windows
For instructions on installing MySQL on Microsoft Windows,
using either a Zipped binary or an MSI package, see Section
2.3, "Installing MySQL on Microsoft Windows."
For details and instructions on building MySQL from source
code using Microsoft Visual Studio, see Section 2.9,
"Installing MySQL from Source."
* Mac OS X
For installation on Mac OS X, including using both the binary
package and native PKG formats, see Section 2.4, "Installing
MySQL on Mac OS X."
For information on making use of the MySQL Startup Item to
automatically start and stop MySQL, see Section 2.4.3,
"Installing the MySQL Startup Item."
For information on the MySQL Preference Pane, see Section
2.4.4, "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 from Generic Binaries on Unix/Linux" 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. Operating Systems Supported by MySQL Community Server
This section lists the operating systems on which MySQL Community
Server is known to run.
Important
Oracle Corporation does not necessarily provide official support
for all the platforms listed in this section. For information
about those platforms that are officially supported, see
http://www.mysql.com/support/supportedplatforms.html on the MySQL
Web site.
We use CMake, so it is possible to port MySQL to all modern
systems that have a C++ compiler and a working implementation of
POSIX threads. (Thread support is needed for the server. To
compile only the client code, the only requirement is a C++
compiler.)
MySQL has been reported to compile successfully on the following
combinations of operating system and thread package.
* FreeBSD 5.x and up with native threads. See Section 2.8,
"Installing MySQL on FreeBSD."
* HP-UX 11.x with the native threads. See Section 2.7,
"Installing MySQL on HP-UX."
* Linux. Builds on all recent Linux distributions based on the
2.6 kernel. See Section 2.5, "Installing MySQL on Linux."
* Mac OS X. See Section 2.4, "Installing MySQL on Mac OS X."
* Solaris 2.8 on SPARC and x86, including support for native
threads. See Section 2.6, "Installing MySQL on Solaris and
OpenSolaris."
* Windows XP, Windows Vista, Windows Server 2003, and Windows
Server 2008. See Section 2.3, "Installing MySQL on Microsoft
Windows."
MySQL has also been known to run on other systems in the past. See
Section 2.1, "General Installation Guidance." Some porting effort
might be required for current versions of MySQL on these systems.
Not all platforms are equally well-suited for running MySQL. How
well a certain platform is suited for a high-load mission-critical
MySQL server is determined by the following factors:
* General stability of the thread library. A platform may have
an excellent reputation otherwise, but MySQL is only as stable
as the thread library it calls, even if everything else is
perfect.
* The capability of the kernel and the thread library to take
advantage of symmetric multi-processor (SMP) systems. In other
words, when a process creates a thread, it should be possible
for that thread to run on a CPU different from the original
process.
* The capability of the kernel and the thread library to run
many threads that acquire and release a mutex over a short
critical region frequently without excessive context switches.
If the implementation of pthread_mutex_lock() is too anxious
to yield CPU time, this hurts MySQL tremendously. If this
issue is not taken care of, adding extra CPUs actually makes
MySQL slower.
* General file system stability and performance.
* Table size. If your tables are large, performance is affected
by the ability of the file system to deal with large files and
dealing with them efficiently.
* Our level of expertise here at Oracle Corporation with the
platform. If we know a platform well, we enable
platform-specific optimizations and fixes at compile time. We
can also provide advice on configuring your system optimally
for MySQL.
* The amount of testing we have done internally for similar
configurations.
* The number of users that have run MySQL successfully on the
platform in similar configurations. If this number is high,
the likelihood of encountering platform-specific surprises is
much smaller.
2.1.2. Choosing Which MySQL Distribution to Install
When preparing to install MySQL, you should decide which version
to use. MySQL development occurs in several release series, and
you can pick the one that best fits your needs. After deciding
which version to install, you can choose a distribution format.
Releases are available in binary or source format.
2.1.2.1. Choosing Which Version of MySQL to Install
The first decision to make is whether you want to use a production
(stable) release or a development release. In the MySQL
development process, multiple release series co-exist, each at a
different stage of maturity.
Production Releases
* MySQL 5.5: Latest General Availability (Production) release
* MySQL 5.1: Previous stable (production-quality) release
* MySQL 5.0: Older stable release nearing the end of the product
lifecycle
Development Release
* MySQL 5.6: Current release under development (pre-Production)
MySQL 4.1, 4.0, and 3.23 are old releases that are no longer
supported.
See http://www.mysql.com/about/legal/lifecycle/ for information
about support policies and schedules.
Normally, if you are beginning to use MySQL for the first time or
trying to port it to some system for which there is no binary
distribution, use the most recent General Availability series
listed in the preceding descriptions. All MySQL releases, even
those from development series, are checked with the MySQL
benchmarks and an extensive test suite before being issued.
If you are running an older system and want to upgrade, but do not
want to take the chance of having a nonseamless upgrade, you
should upgrade to the latest version in the same release series
you are using (where only the last part of the version number is
newer than yours). We have tried to fix only fatal bugs and make
only small, relatively "safe" changes to that version.
If you want to use new features not present in the production
release series, you can use a version from a development series.
Be aware that development releases are not as stable as production
releases.
We do not use a complete code freeze because this prevents us from
making bugfixes and other fixes that must be done. We may add
small things that should not affect anything that currently works
in a production release. Naturally, relevant bugfixes from an
earlier series propagate to later series.
If you want to use the very latest sources containing all current
patches and bugfixes, you can use one of our source code
repositories (see Section 2.9.3, "Installing MySQL from a
Development Source Tree"). These are not "releases" as such, but
are available as previews of the code on which future releases are
to be based.
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 also include a suffix to 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:
* 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.
* 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.
All releases of MySQL are run through our standard tests and
benchmarks to ensure that they are relatively safe to use. Because
the standard tests are extended over time to check for all
previously found bugs, the test suite keeps getting better.
All releases have been tested at least with these tools:
* An internal test suite. The mysql-test directory contains an
extensive set of test cases. We run these tests for every
server binary. See Section 22.1.2, "The MySQL Test Suite," for
more information about this test suite.
* The MySQL benchmark suite. This suite runs a range of common
queries. It is also a test to determine whether the latest
batch of optimizations actually made the code faster. See
Section 8.12.2, "The MySQL Benchmark Suite."
We also perform additional integration and nonfunctional testing
of the latest MySQL version in our internal production
environment. Integration testing is done with different
connectors, storage engines, replication modes, backup,
partitioning, stored programs, and so forth in various
combinations. Additional nonfunctional testing is done in areas of
performance, concurrency, stress, high volume, upgrade and
downgrade.
2.1.2.2. Choosing a Distribution Format
After choosing which version of MySQL to install, you should
decide whether to use a binary distribution or a source
distribution. In most cases, you should probably use a binary
distribution, if one exists for your platform. Binary
distributions are available in native format for many platforms,
such as RPM files for Linux or PKG package installers for Mac OS X
or Solaris. Distributions also are available as Zip archives or
compressed tar files.
Reasons to choose a binary distribution include the following:
* Binary distributions generally are easier to install than
source distributions.
* To satisfy different user requirements, we provide several
servers in binary distributions. mysqld is an optimized server
that is a smaller, faster binary. mysqld-debug is compiled
with debugging support.
Each of these servers is compiled from the same source
distribution, though with different configuration options. All
native MySQL clients can connect to servers from either MySQL
version.
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
* 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 Bazaar
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,
because the source code is always the ultimate manual.
* Source distributions contain more tests and examples than
binary distributions.
2.1.2.3. How and When Updates Are Released
MySQL is evolving quite rapidly and we want to share new
developments with other MySQL users. We try to produce a new
release whenever we have new and useful features that others also
seem to have a need for.
We also try to help users who request features that are easy to
implement. We take note of what our licensed users want, and we
especially take note of what our support customers want and try to
help them in this regard.
No one is required to download a new release. The Release Notes
(http://dev.mysql.com/doc/relnotes/mysql/5.6/en/) help you
determine whether the new release has something you really want.
We use the following policy when updating MySQL:
* Enterprise Server releases are meant to appear every 18
months, supplemented by quarterly service packs and monthly
rapid updates. Community Server releases are meant to appear 2
to 3 times per year.
* Releases are issued within each series. For each release, the
last number in the version is one more than the previous
release within the same series.
* Binary distributions for some platforms are made by us for
major releases. Other people may make binary distributions for
other systems, but probably less frequently.
* We make fixes available as soon as we have identified and
corrected small or noncritical but annoying bugs. The fixes
are available in source form immediately from our public
Bazaar repositories, and are included in the next release.
* If by any chance a security vulnerability or critical bug is
found in a release, our policy is to fix it in a new release
as soon as possible. (We would like other companies to do
this, too!)
2.1.3. 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.
To obtain the latest development source, see Section 2.9.3,
"Installing MySQL from a Development Source Tree."
2.1.4. 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.4.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 with the following command, where package_name is the
name of the package you downloaded:
shell> md5sum package_name
Example:
shell> md5sum mysql-standard-5.6.11-linux-i686.tar.gz
aaab65abbec64d5e907dcd41b8699945 mysql-standard-5.6.11-linux-i686.ta
r.gz
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 or .tar.gz file) and not of the files that are contained
inside of the archive.
Note that not all operating systems support the md5sum command. On
some, it is simply called md5, and others 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 download the
source code from http://www.gnu.org/software/textutils/ as well.
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.
2.1.4.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.com/. The key that you want to obtain is named
mysql-build@oss.oracle.com. Alternatively, you can cut and paste
the key directly from the following text:
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: PGP Universal 2.9.1 (Build 347)
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
=Eto8
-----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
<mysql-build@oss.oracle.com>" 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 <mysql-build@oss.oracle
.com>"
1 new user ID
gpg: key 5072E1F5: "MySQL Release Engineering <mysql-build@oss.oracle
.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, try exporting the key from gpg and
importing:
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 cas use this manual page:
shell> rpm --import http://dev.mysql.com/doc/refman/5.6/en/checking-g
pg-signature.html
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
File Type File Name
Distribution file mysql-standard-5.6.11-linux-i686.tar.gz
Signature file mysql-standard-5.6.11-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
Example:
shell> gpg --verify mysql-standard-5.6.11-linux-i686.tar.gz.asc
gpg: Signature made Tue 01 Feb 2011 02:38:30 AM CST using DSA key ID
5072E1F5
gpg: Good signature from "MySQL Release Engineering <mysql-build@oss.
oracle.com>"
The Good signature message indicates that everything is all right.
You can ignore any insecure memory warning you might obtain.
See the GPG documentation for more information on how to work with
public keys.
2.1.4.3. 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.11-0.glibc23.i386.rpm
MySQL-server-5.6.11-0.glibc23.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 as
described in Section 2.1.4.2, "Signature Checking Using GnuPG."
Then use rpm --import to import the key. For example, if you have
saved the public key in a file named mysql_pubkey.asc, import it
using this command:
shell> rpm --import mysql_pubkey.asc
If you need to obtain the MySQL public key, see Section 2.1.4.2,
"Signature Checking Using GnuPG."
2.1.5. 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.1, "MySQL Installation Layout for Linux RPM"
* Section 2.4.2, "MySQL Installation Layout on Mac OS X"
2.1.6. 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 from Generic Binaries on Unix/Linux
Oracle provides a set of binary distributions of MySQL. These
include binary distributions in the form of compressed tar files
(files with a .tar.gz extension) for a number of platforms, as
well as 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.3, "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.11), and OS indicates the type of operating system
for which the distribution is intended (for example, pc-linux-i686
or winx64).
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/.
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 previous 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 the existence of
configuration files such as /etc/my.cnf or the /etc/mysql
directory have been deleted.
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.2. MySQL Installation Layout for Generic Unix/Linux Binary
Package
Directory Contents of Directory
bin Client programs and the mysqld server
data Log files, databases
docs Manual in Info format
man Unix manual pages
include Include (header) files
lib Libraries
scripts mysql_install_db
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. For more information on compiling from source,
see Section 2.9, "Installing MySQL from Source."
To install and use a MySQL binary distribution, the basic 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
# Next command is optional
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> bin/mysqld_safe --user=mysql &
# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysql.server
A more detailed version of the preceding description for
installing a binary distribution follows.
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.
The procedure does not set up any passwords for MySQL accounts.
After following the procedure, proceed to Section 2.10,
"Postinstallation Setup and Testing."
Create a mysql User and Group
If your system does not already have a user and group for mysqld
to run as, 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.3, "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.
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 up the
configuration file, creating the core databases, and starting the
MySQL server. For instructions, see Section 2.10,
"Postinstallation Setup and Testing."
Note
The accounts that are listed in the MySQL grant tables initially
have no passwords. After starting the server, you should set up
passwords for them using the instructions in Section 2.10,
"Postinstallation Setup and Testing."
2.3. Installing MySQL on Microsoft Windows
A native Windows distribution of MySQL has been available since
version 3.21 and represents a sizable percentage of the daily
downloads of MySQL. This section describes the process for
installing MySQL on Windows.
Note
If you are upgrading MySQL from an existing installation older
than MySQL 4.1.5, you must first perform the procedure described
in Section 2.3.6, "Upgrading MySQL on Windows."
To run MySQL on Windows, you need the following:
* A Windows operating system such as Windows XP, Windows Vista,
Windows Server 2003, Windows Server 2008, or Windows 7. Both
32-bit and 64-bit versions are supported. See the supported
platforms
(http://www.mysql.com/support/supportedplatforms/database.html
) listing for a detailed list.
A Windows operating system permits you to run the MySQL server
as a service. See Section 2.3.4.8, "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.
* TCP/IP protocol support.
* Enough space on the hard drive to unpack, install, and create
the databases in accordance with your requirements (generally
a minimum of 200 megabytes is recommended.)
For a list of limitations within the Windows version of MySQL, see
Section E.10.5, "Windows Platform Limitations."
There may also be other requirements, depending on how you plan to
use MySQL:
* If you plan to connect to the MySQL server using ODBC, you
need a Connector/ODBC driver. See Section 21.1, "MySQL
Connector/ODBC."
* If you plan to use MySQL server with ADO.NET applications, you
need the Connector/Net driver. See Section 21.2, "MySQL
Connector/Net."
* If you need tables with a size larger than 4GB, install MySQL
on an NTFS or newer file system. Do not forget to use MAX_ROWS
and AVG_ROW_LENGTH when you create tables. See Section
13.1.14, "CREATE TABLE Syntax."
MySQL for Windows is available in several distribution formats:
* Binary distributions are available that contain a setup
program that installs everything you need so that you can
start the server immediately. For details, see Section 2.3.2,
"Choosing An Installation Package."
* Or the source distribution that contains all of the code and
support files for building the executables using the Visual
Studio compiler system.
Generally speaking, you should use a binary distribution that
includes MySQL Installer. It is simpler to use than the others,
and you do not require additional tools to get MySQL up and
running. The MySQL Installer is used to both install and upgrade
MySQL products, and includes a GUI interface to configure the
MySQL Server during set up, which also creates a MySQL Server
configuration file, starts the server, and configures the default
user accounts.
Caution
Using virus scanning software such as Norton/Symantec Anti-Virus
on directories containing MySQL data and temporary tables can
cause issues, both in terms of the performance of MySQL and the
virus-scanning software mis-identifying the contents of the files
as containing spam. This is because of the fingerprinting
mechanism used by the virus scanning software, and the way in
which MySQL rapidly updates different files, which may be
identified as a potential security risk.
After installing MySQL Server, it is recommended that you disable
virus scanning on the main directory (datadir) being used to store
your MySQL table data. There is usually a system built into the
virus scanning software to enable certain directories to be
specifically ignored during virus scanning.
In addition, by default, MySQL creates temporary files in the
standard Windows temporary directory. To prevent the temporary
files also being scanned, you should configure a separate
temporary directory for MySQL temporary files and add this to the
virus scanning exclusion list. To do this, add a configuration
option for the tmpdir parameter to your my.ini configuration file.
For more information, see Section 2.3.4.2, "Creating an Option
File."
The following section describes how to install MySQL on Windows
using a binary distribution. To use an installation package that
does not include an installer, follow the procedure described in
Section 2.3.4, "Installing MySQL on Microsoft Windows Using a
noinstall Zip Archive." To install using a source distribution,
see Section 2.9, "Installing MySQL from Source."
MySQL distributions for Windows can be downloaded from
http://dev.mysql.com/downloads/. See Section 2.1.3, "How to Get
MySQL."
2.3.1. MySQL Installation Layout on Microsoft Windows
For MySQL 5.6 on Windows, the default installation directory is
C:\Program Files\MySQL\MySQL Server 5.6. Some Windows users prefer