337
337
* An internal test suite. The mysql-test directory contains an
338
338
extensive set of test cases. We run these tests for every
339
server binary. See Section 22.1.2, "The MySQL Test Suite," for
339
server binary. See Section 23.1.2, "The MySQL Test Suite," for
340
340
more information about this test suite.
342
342
* The MySQL benchmark suite. This suite runs a range of common
343
343
queries. It is also a test to determine whether the latest
344
344
batch of optimizations actually made the code faster. See
345
Section 7.12.2, "The MySQL Benchmark Suite."
345
Section 8.12.2, "The MySQL Benchmark Suite."
347
347
We also perform additional integration and nonfunctional testing
348
348
of the latest MySQL version in our internal production
636
636
Table 2.1. MySQL Package and Signature Files
637
637
File Type File Name
638
Distribution file mysql-standard-5.5.23-linux-i686.tar.gz
639
Signature file mysql-standard-5.5.23-linux-i686.tar.gz.asc
638
Distribution file mysql-standard-5.5.25-linux-i686.tar.gz
639
Signature file mysql-standard-5.5.25-linux-i686.tar.gz.asc
641
641
Make sure that both files are stored in the same directory and
642
642
then run the following command to verify the signature for the
741
741
MySQL compressed tar file binary distributions have names of the
742
742
form mysql-VERSION-OS.tar.gz, where VERSION is a number (for
743
example, 5.5.23), and OS indicates the type of operating system
743
example, 5.5.25), and OS indicates the type of operating system
744
744
for which the distribution is intended (for example, pc-linux-i686
935
935
* If you plan to connect to the MySQL server using ODBC, you
936
need a Connector/ODBC driver. See Section 21.1, "MySQL
936
need a Connector/ODBC driver. See Section 22.1, "MySQL
939
939
* If you plan to use MySQL server with ADO.NET applications, you
940
need the Connector/Net driver. See Section 21.2, "MySQL
940
need the Connector/Net driver. See Section 22.2, "MySQL
943
943
* If you need tables with a size larger than 4GB, install MySQL
944
944
on an NTFS or newer file system. Do not forget to use MAX_ROWS
945
945
and AVG_ROW_LENGTH when you create tables. See Section
946
12.1.17, "CREATE TABLE Syntax."
946
13.1.17, "CREATE TABLE Syntax."
948
948
MySQL for Windows is available in several distribution formats:
1037
1037
used to run multiple instances of MySQL: After an installation has
1038
1038
been performed using an MSI package, the template data directory
1039
1039
can be copied to set up additional MySQL instances. See Section
1040
5.6, "Running Multiple MySQL Instances on One Machine."
1040
5.3, "Running Multiple MySQL Instances on One Machine."
1042
1042
2.3.2. Choosing An Installation Package
1051
1051
within the "Complete Package."
1053
1053
* MySQL Installer: This package has a file name similar to
1054
mysql-installer-5.5.23.0.msi and utilizes MSI's to
1054
mysql-installer-5.5.25.0.msi and utilizes MSI's to
1055
1055
automatically install MySQL server and other products. It will
1056
1056
download and apply updates to itself, and for each of the
1057
1057
installed products. It also configures the additional
1062
1062
Server with its components.
1064
1064
* The Complete Package: This package has a file name similar to
1065
mysql-5.5.23-win32.msi and contains all files needed for a
1065
mysql-5.5.25-win32.msi and contains all files needed for a
1066
1066
complete Windows installation, including the Configuration
1067
1067
Wizard. This package includes optional components such as the
1068
1068
embedded server and benchmark suite.
1070
1070
* The Noinstall Archive: This package has a file name similar to
1071
mysql-5.5.23-win32.zip and contains all the files found in the
1071
mysql-5.5.25-win32.zip and contains all the files found in the
1072
1072
Complete install package, with the exception of the
1073
1073
Configuration Wizard. This package does not include an
1074
1074
automated installer, and must be manually installed and
1477
1477
directory. In a default installation it contains C:\Program
1478
1478
Files\MySQL\MySQL Server 5.5\. The Version string contains the
1479
1479
release number. For example, for an installation of MySQL Server
1480
5.5.23, the key contains a value of 5.5.23.
1480
5.5.25, the key contains a value of 5.5.25.
1482
1482
These registry keys are used to help external tools identify the
1483
1483
installed location of the MySQL server, preventing a complete scan
1567
1567
the command line (or within a script), you need to use the
1568
1568
msiexec.exe tool. For example, to perform a quiet installation
1569
1569
(which shows no dialog boxes or progress):
1570
shell> msiexec /i /quiet mysql-5.5.23.msi
1570
shell> msiexec /i /quiet mysql-5.5.25.msi
1572
1572
The /i indicates that you want to perform an installation. The
1573
1573
/quiet option indicates that you want no interactive elements.
1575
1575
To provide a dialog box showing the progress during installation,
1576
1576
and the dialog boxes providing information on the installation and
1577
1577
registration of MySQL, use /passive mode instead of /quiet:
1578
shell> msiexec /i /passive mysql-5.5.23.msi
1578
shell> msiexec /i /passive mysql-5.5.25.msi
1580
1580
Regardless of the mode of the installation, installing the package
1581
1581
in this manner performs a 'Typical' installation, and installs the
2437
2437
something like this, which indicates that the server is ready to
2438
2438
service client connections:
2439
2439
mysqld: ready for connections
2440
Version: '5.5.23' socket: '' port: 3306
2440
Version: '5.5.25' socket: '' port: 3306
2442
2442
The server continues to write to the console any further
2443
2443
diagnostic output it produces. You can open a new console window
3555
3555
install it, you should not also install MySQL-shared. As of
3556
3556
5.5.6, MySQL-shared-compat does not include the current
3557
3557
library version, so there is no conflict.
3558
As of MySQL 5.5.23, the MySQL-shared-compat RPM package
3559
enables users of Red Hat-privided mysql-*-5.1 RPM packages to
3560
migrate to Oracle-provided MySQL-*-5.5 packages.
3561
MySQL-shared-compat replaces the Red Hat mysql-libs package by
3562
replacing libmysqlclient.so files of the latter package, thus
3563
satisfying dependencies of other packages on mysql-libs. This
3564
change affects only users of Red Hat (or Red Hat-compatible)
3565
RPM packages. Nothing is different for users of Oracle RPM
3559
3568
* MySQL-embedded-VERSION.glibc23.i386.rpm
3560
3569
The embedded MySQL server library.
4019
4028
To use this package, download the corresponding
4020
4029
mysql-VERSION-solaris10-PLATFORM.pkg.gz file, then decompress it.
4022
shell> gunzip mysql-5.5.23-solaris10-x86_64.pkg.gz
4031
shell> gunzip mysql-5.5.25-solaris10-x86_64.pkg.gz
4024
4033
To install a new package, use pkgadd and follow the onscreen
4025
4034
prompts. You must have root privileges to perform this operation:
4026
shell> pkgadd -d mysql-5.5.23-solaris10-x86_64.pkg
4035
shell> pkgadd -d mysql-5.5.25-solaris10-x86_64.pkg
4028
4037
The following packages are available:
4029
4038
1 mysql MySQL Community Server (GPL)
4032
4041
Select package(s) you wish to process (or 'all' to process
4033
4042
all packages). (default: all) [?,??,q]:
4315
4324
Standard distributions are available as compressed tar files,
4316
4325
Zip archives, or RPM packages. Distribution files have names
4317
4326
of the form mysql-VERSION.tar.gz, mysql-VERSION.zip, or
4318
mysql-VERSION.rpm, where VERSION is a number like 5.5.23. File
4327
mysql-VERSION.rpm, where VERSION is a number like 5.5.25. File
4319
4328
names for source distributions can be distinguished from those
4320
4329
for precompiled binary distributions in that source
4321
4330
distribution names are generic and include no platform name,
4783
4792
MYSQL_UNIX_ADDR options different from those used by your
4784
4793
production server. For additional information about preventing
4785
4794
multiple servers from interfering with each other, see Section
4786
5.6, "Running Multiple MySQL Instances on One Machine."
4795
5.3, "Running Multiple MySQL Instances on One Machine."
4788
4797
Play hard with your new installation. For example, try to make new
4789
features crash. Start by running make test. See Section 22.1.2,
4798
features crash. Start by running make test. See Section 23.1.2,
4790
4799
"The MySQL Test Suite."
4792
4801
2.9.4. MySQL Source-Configuration Options
5070
5079
MySQL Cluster using the MySQL Cluster sources. It cannot be used
5071
5080
to enable clustering support in other MySQL source trees or
5072
5081
distributions. In MySQL Cluster NDB 7.2 source distributions, it
5073
is enabled by default. See Section 16.2.1.3, "Building MySQL
5074
Cluster from Source on Linux," and Section 16.2.2.2, "Compiling
5082
is enabled by default. See Section 17.2.1.3, "Building MySQL
5083
Cluster from Source on Linux," and Section 17.2.2.2, "Compiling
5075
5084
and Installing MySQL Cluster from Source on Windows," for more
5146
5155
LOAD DATA INFILE.
5147
5156
This option controls client-side LOCAL capability, but the
5148
5157
capability can be set on the server side at server startup
5149
with the --local-infile option. See Section 5.3.5, "Security
5158
with the --local-infile option. See Section 6.1.6, "Security
5150
5159
Issues with LOAD DATA LOCAL."
5152
5161
* -DENABLED_PROFILING=bool
5454
5463
When you are ready to create additional user accounts, you can
5455
5464
find information on the MySQL access control system and account
5456
management in Section 5.4, "The MySQL Access Privilege System,"
5457
and Section 5.5, "MySQL User Account Management."
5465
management in Section 6.2, "The MySQL Access Privilege System,"
5466
and Section 6.3, "MySQL User Account Management."
5459
5468
2.10.1. Unix Postinstallation Procedures
5567
5576
MySQL Accounts," describes the initial privileges. Briefly,
5568
5577
these privileges permit the MySQL root user to do anything,
5569
5578
and permit anybody to create or use databases with a name of
5570
test or starting with test_. See Section 5.4, "The MySQL
5579
test or starting with test_. See Section 6.2, "The MySQL
5571
5580
Access Privilege System," for a complete listing and
5572
5581
description of the grant tables.
5573
5582
It is important to make sure that the database directories and
5625
5634
mysql, in which case you can omit the --user option from the
5627
5636
For further instructions for running MySQL as an unprivileged
5628
user, see Section 5.3.6, "How to Run MySQL as a Normal User."
5637
user, see Section 6.1.5, "How to Run MySQL as a Normal User."
5629
5638
If the command fails immediately and prints mysqld ended, look
5630
5639
for information in the error log (which by default is the
5631
5640
host_name.err file in the data directory).
5652
5661
on your platform and version of MySQL, but should be similar
5653
5662
to that shown here:
5654
5663
shell> bin/mysqladmin version
5655
mysqladmin Ver 14.12 Distrib 5.5.23, for pc-linux-gnu on i686
5664
mysqladmin Ver 14.12 Distrib 5.5.25, for pc-linux-gnu on i686
5658
Server version 5.5.23
5667
Server version 5.5.25
5659
5668
Protocol version 10
5660
5669
Connection Localhost via UNIX socket
5661
5670
UNIX socket /var/lib/mysql/mysql.sock
5761
5770
The MySQL 5.5 installation procedure creates time zone tables in
5762
5771
the mysql database but does not populate them. To do so, use the
5763
instructions in Section 9.6, "MySQL Server Time Zone Support."
5772
instructions in Section 10.6, "MySQL Server Time Zone Support."
5765
5774
To make it more convenient to invoke programs installed in the bin
5766
5775
directory under the installation directory, you can add that
5836
5845
Address already in use
5837
5846
Can't start server: Bind on unix socket...
5838
5847
For instructions on setting up multiple servers, see Section
5839
5.6, "Running Multiple MySQL Instances on One Machine."
5848
5.3, "Running Multiple MySQL Instances on One Machine."
5841
5850
* You do not have write access to the /tmp directory
5842
5851
If you do not have write access to create temporary files or a
6209
6218
running. If so, shut down the server before starting mysqld again.
6210
6219
(If another server is running, and you really want to run multiple
6211
6220
servers, you can find information about how to do so in Section
6212
5.6, "Running Multiple MySQL Instances on One Machine.")
6221
5.3, "Running Multiple MySQL Instances on One Machine.")
6214
6223
If no other server is running, try to execute the command telnet
6215
6224
your_host_name tcp_ip_port_number. (The default MySQL port number
6346
6355
or testing. However, be sure to set them before using your
6347
6356
installation for production purposes.
6349
To set up additional accounts, see Section 5.5.2, "Adding User
6358
To set up additional accounts, see Section 6.3.2, "Adding User
6352
6361
Assigning root Account Passwords
6523
6532
* Before any upgrade, back up your databases, including the
6524
6533
mysql database that contains the grant tables. See Section
6525
6.2, "Database Backup Methods."
6534
7.2, "Database Backup Methods."
6527
6536
* Read all the notes in Section 2.11.1.1, "Upgrading from MySQL
6528
6537
5.1 to 5.5," or Section 2.11.1.2, "Upgrading from MySQL 5.4 to
6545
6554
MySQL introduce changes to the structure of the grant tables
6546
6555
to add new privileges or features.)
6547
6556
mysql_upgrade does not upgrade the contents of the help
6548
tables. For upgrade instructions, see Section 5.1.8,
6557
tables. For upgrade instructions, see Section 5.1.9,
6549
6558
"Server-Side Help."
6551
6560
* If you run MySQL Server on Windows, see Section 2.3.8,
6552
6561
"Upgrading MySQL on Windows."
6554
* If you use replication, see Section 15.4.3, "Upgrading a
6563
* If you use replication, see Section 16.4.3, "Upgrading a
6555
6564
Replication Setup," for information on upgrading your
6556
6565
replication setup.
6568
6577
UDF, and then use CREATE FUNCTION to re-create the UDF with a
6569
6578
different nonconflicting name. The same is true if the new
6570
6579
version of MySQL implements a built-in function with the same
6571
name as an existing stored function. See Section 8.2.4,
6580
name as an existing stored function. See Section 9.2.4,
6572
6581
"Function Name Parsing and Resolution," for the rules
6573
6582
describing how the server interprets references to different
6574
6583
kinds of functions.
6667
6676
done before upgrading. Use of this statement with a version of
6668
6677
MySQL different from the one used to create the table (that
6669
6678
is, using it after upgrading) may damage the table. See
6670
Section 12.7.2.5, "REPAIR TABLE Syntax."
6679
Section 13.7.2.5, "REPAIR TABLE Syntax."
6672
6681
* Before upgrading to a new version of MySQL, Section 2.11.3,
6673
6682
"Checking Whether Tables or Indexes Must Be Rebuilt," to see
6688
6697
MySQL introduce changes to the structure of the grant tables
6689
6698
to add new privileges or features.)
6690
6699
mysql_upgrade does not upgrade the contents of the help
6691
tables. For upgrade instructions, see Section 5.1.8,
6700
tables. For upgrade instructions, see Section 5.1.9,
6692
6701
"Server-Side Help."
6694
6703
* If you run MySQL Server on Windows, see Section 2.3.8,
6695
6704
"Upgrading MySQL on Windows."
6697
* If you use replication, see Section 15.4.3, "Upgrading a
6706
* If you use replication, see Section 16.4.3, "Upgrading a
6698
6707
Replication Setup," for information on upgrading your
6699
6708
replication setup.
6899
6908
throw an "out of range" error (ER_DATA_OUT_OF_RANGE) rather
6900
6909
than returning an incorrect value or NULL, when the result is
6901
6910
out of the supported range for the corresponding data type.
6902
See Section 10.2.6, "Out-of-Range and Overflow Handling."
6911
See Section 11.2.6, "Out-of-Range and Overflow Handling."
6904
6913
* Incompatible change: In very old versions of MySQL (prior to
6905
6914
4.1), the TIMESTAMP data type supported a display width, which
6980
6989
it may be necessary to change some column or index
6982
6991
For additional details about the new Unicode character sets
6983
and potential incompatibilities, see Section 9.1.10, "Unicode
6984
Support," and Section 9.1.11, "Upgrading from Previous to
6992
and potential incompatibilities, see Section 10.1.10, "Unicode
6993
Support," and Section 10.1.11, "Upgrading from Previous to
6985
6994
Current Unicode Support."
6987
6996
* Incompatible change: As of MySQL 5.5.3, the server includes
6996
7005
exact result from previous conversions might need adjustment
6997
7006
to accommodate additional precision.
6998
7007
For additional information about the properties of dtoa
6999
conversions, see Section 11.2, "Type Conversion in Expression
7008
conversions, see Section 12.2, "Type Conversion in Expression
7002
7011
* Incompatible change: In MySQL 5.5, several changes were made
7025
7034
specified by the character_set_results system variable.
7026
7035
The content of error messages therefore may in some cases
7027
7036
differ from the messages returned previously.
7028
For more information, see Section 9.2, "Setting the Error
7029
Message Language," and Section 9.1.6, "Character Set for Error
7037
For more information, see Section 10.2, "Setting the Error
7038
Message Language," and Section 10.1.6, "Character Set for
7135
7144
done before upgrading. Use of this statement with a version of
7136
7145
MySQL different from the one used to create the table (that
7137
7146
is, using it after upgrading) may damage the table. See
7138
Section 12.7.2.5, "REPAIR TABLE Syntax."
7147
Section 13.7.2.5, "REPAIR TABLE Syntax."
7140
7149
* Before upgrading to a new version of MySQL, Section 2.11.3,
7141
7150
"Checking Whether Tables or Indexes Must Be Rebuilt," to see
7156
7165
MySQL introduce changes to the structure of the grant tables
7157
7166
to add new privileges or features.)
7158
7167
mysql_upgrade does not upgrade the contents of the help
7159
tables. For upgrade instructions, see Section 5.1.8,
7168
tables. For upgrade instructions, see Section 5.1.9,
7160
7169
"Server-Side Help."
7162
7171
* If you run MySQL Server on Windows, see Section 2.3.8,
7163
7172
"Upgrading MySQL on Windows."
7165
* If you use replication, see Section 15.4.3, "Upgrading a
7174
* If you use replication, see Section 16.4.3, "Upgrading a
7166
7175
Replication Setup," for information on upgrading your
7167
7176
replication setup.
7258
7267
it may be necessary to change some column or index
7260
7269
For additional details about the new Unicode character sets
7261
and potential incompatibilities, see Section 9.1.10, "Unicode
7262
Support," and Section 9.1.11, "Upgrading from Previous to
7270
and potential incompatibilities, see Section 10.1.10, "Unicode
7271
Support," and Section 10.1.11, "Upgrading from Previous to
7263
7272
Current Unicode Support."
7265
7274
* Incompatible change: As of MySQL 5.5.3, the server includes
7274
7283
exact result from previous conversions might need adjustment
7275
7284
to accommodate additional precision.
7276
7285
For additional information about the properties of dtoa
7277
conversions, see Section 11.2, "Type Conversion in Expression
7286
conversions, see Section 12.2, "Type Conversion in Expression
7280
7289
* Incompatible change: In MySQL 5.5, several changes were made
7303
7312
specified by the character_set_results system variable.
7304
7313
The content of error messages therefore may in some cases
7305
7314
differ from the messags returned previously.
7306
For more information, see Section 9.2, "Setting the Error
7307
Message Language," and Section 9.1.6, "Character Set for Error
7315
For more information, see Section 10.2, "Setting the Error
7316
Message Language," and Section 10.1.6, "Character Set for
7310
7319
* Before MySQL 5.1.36, plugin options were boolean options (see
7311
7320
Section 4.2.3.2, "Program Option Modifiers"). If you upgrade
7464
7473
Index Incompatibilities
7466
In MySQL 5.5.14, the length limit for index prefix keys is
7475
In MySQL 5.6.3, the length limit for index prefix keys is
7467
7476
increased from 767 bytes to 3072 bytes, for InnoDB tables using
7468
ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED. See Section 13.3.15,
7477
ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED. See Section 14.3.15,
7469
7478
"Limits on InnoDB Tables" for details. This change is also
7470
7479
backported to MySQL 5.5.14. If you downgrade from one of these
7471
7480
releases or higher, to an earlier release with a lower length
7499
7508
The solution to these problems is to rebuild any indexes that use
7500
7509
an affected character set or collation, either by dropping and
7501
7510
re-creating the indexes, or by dumping and reloading the entire
7502
table. For information about rebuilding indexes, see Section
7503
2.11.4, "Rebuilding or Repairing Tables or Indexes."
7511
table. In some cases, it is possible to alter affected columns to
7512
use a different collation. For information about rebuilding
7513
indexes, see Section 2.11.4, "Rebuilding or Repairing Tables or
7505
7516
To check whether a table has indexes that must be rebuilt, consult
7506
7517
the following list. It indicates which versions of MySQL
7519
7530
In many cases, you can use CHECK TABLE ... FOR UPGRADE to identify
7520
tables for which index rebuilding is required. (It will report:
7521
Table upgrade required. Please do "REPAIR TABLE `tbl_name`" or
7522
dump/reload to fix it!) In these cases, you can also use
7523
mysqlcheck --check-upgrade or mysql_upgrade, which execute CHECK
7524
TABLE. However, the use of CHECK TABLE applies only after
7525
upgrades, not downgrades. Also, CHECK TABLE is not applicable to
7526
all storage engines. For details about which storage engines CHECK
7527
TABLE supports, see Section 12.7.2.2, "CHECK TABLE Syntax."
7529
Changes that cause index rebuilding to be necessary:
7531
* MySQL 5.0.48, 5.1.21 (Bug #29461)
7532
Affects indexes for columns that use any of these character
7533
sets: eucjpms, euc_kr, gb2312, latin7, macce, ujis
7531
tables for which index rebuilding is required. It will report this
7533
Table upgrade required.
7534
Please do "REPAIR TABLE `tbl_name`" or dump/reload to fix it!
7536
In these cases, you can also use mysqlcheck --check-upgrade or
7537
mysql_upgrade, which execute CHECK TABLE. However, the use of
7538
CHECK TABLE applies only after upgrades, not downgrades. Also,
7539
CHECK TABLE is not applicable to all storage engines. For details
7540
about which storage engines CHECK TABLE supports, see Section
7541
13.7.2.2, "CHECK TABLE Syntax."
7543
These changes cause index rebuilding to be necessary:
7545
* MySQL 5.1.24, 5.4.0 (Bug #27877)
7546
Affects indexes that use the utf8_general_ci or
7547
ucs2_general_ci collation for columns that contain 'ß' LATIN
7548
SMALL LETTER SHARP S (German). The bug fix corrected an error
7549
in the original collations but introduced an incompatibility
7550
such that 'ß' compares equal to characters with which it
7551
previously compared different.
7534
7552
Affected tables can be detected by CHECK TABLE ... FOR UPGRADE
7535
as of MySQL 5.1.29, 5.4.0 (see Bug #39585).
7553
as of MySQL 5.1.30, 5.4.0 (see Bug #40053).
7554
A workaround for this issue is implemented as of MySQL 5.1.62,
7555
5.5.21, and 5.6.5. The workaround involves altering affected
7556
columns to use the utf8_general_mysql500_ci and
7557
ucs2_general_mysql500_ci collations, which preserve the
7558
original pre-5.1.24 ordering of utf8_general_ci and
7537
7561
* MySQL 5.0.48, 5.1.23 (Bug #27562)
7538
7562
Affects indexes that use the ascii_general_ci collation for
7542
7566
Affected tables can be detected by CHECK TABLE ... FOR UPGRADE
7543
7567
as of MySQL 5.1.29, 5.4.0 (see Bug #39585).
7545
* MySQL 5.1.24, 5.4.0 (Bug #27877)
7546
Affects indexes that use the utf8_general_ci or
7547
ucs2_general_ci collation for columns that contain 'ß' LATIN
7548
SMALL LETTER SHARP S (German).
7569
* MySQL 5.0.48, 5.1.21 (Bug #29461)
7570
Affects indexes for columns that use any of these character
7571
sets: eucjpms, euc_kr, gb2312, latin7, macce, ujis
7549
7572
Affected tables can be detected by CHECK TABLE ... FOR UPGRADE
7550
as of MySQL 5.1.30, 5.4.0 (see Bug #40053).
7573
as of MySQL 5.1.29, 5.4.0 (see Bug #39585).
7552
7575
2.11.4. Rebuilding or Repairing Tables or Indexes
7613
7636
the file, as described earlier.
7615
7638
For specifics about which storage engines REPAIR TABLE supports,
7616
see Section 12.7.2.5, "REPAIR TABLE Syntax."
7639
see Section 13.7.2.5, "REPAIR TABLE Syntax."
7618
7641
mysqlcheck --repair provides command-line access to the REPAIR
7619
7642
TABLE statement. This can be a more convenient means of repairing
7623
7646
shell> mysqlcheck --repair --databases db_name ...
7624
7647
shell> mysqlcheck --repair --all-databases
7649
For incompatibilities introduced in MySQL 5.1.24 by the fix for
7650
Bug #27877 that corrected the utf8_general_ci and ucs2_general_ci
7651
collations, a workaround is implemented as of MySQL 5.1.62,
7652
5.5.21, and 5.6.5. Upgrade to one of those versins, then convert
7653
each afected table using one of the following methods. In each
7654
case, the workaround altering affected columns to use the
7655
utf8_general_mysql500_ci and ucs2_general_mysql500_ci collations,
7656
which preserve the original pre-5.1.24 ordering of utf8_general_ci
7657
and ucs2_general_ci.
7659
* To convert an affected table after a binary upgrade that
7660
leaves the table files in place, alter the table to use the
7661
new collation. Suppose that the table t1 contains one or more
7662
problematic utf8 columns. To convert the table at the table
7663
level, use a statement like this:
7665
CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_mysql500_ci;
7666
To apply the change on a column-specific basis, use a
7667
statement like this (be sure to repeat the column definition
7668
as originally specified except for the COLLATE clause):
7670
MODIFY c1 CHAR(N) CHARACTER SET utf8 COLLATE utf8_general_mysql500_ci
7673
* To upgrade the table using a dump and reload procedure, dump
7674
the table using mysqldump, modify the CREATE TABLE statement
7675
in the dump file to use the new collation, and reload the
7678
After making the appropriate changes, CHECK TABLE should report no
7626
7681
2.11.5. Copying MySQL Databases to Another Machine
7628
7683
You can copy the .frm, .MYI, and .MYD files for MyISAM tables
7629
7684
between different architectures that support the same
7630
7685
floating-point format. (MySQL takes care of any byte-swapping
7631
issues.) See Section 13.5, "The MyISAM Storage Engine."
7686
issues.) See Section 14.5, "The MyISAM Storage Engine."
7633
7688
In cases where you need to transfer databases between different
7634
7689
architectures, you can use mysqldump to create a file containing
7725
7780
MYSQL_PS1 The command prompt to use in the mysql command-line
7727
7782
MYSQL_PWD The default password when connecting to mysqld. Note
7728
that using this is insecure. See Section 5.3.2.2, "End-User
7783
that using this is insecure. See Section 6.1.2.2, "End-User
7729
7784
Guidelines for Password Security."
7730
7785
MYSQL_TCP_PORT The default TCP/IP port number.
7731
7786
MYSQL_UNIX_PORT The default Unix socket file name; used for
7770
7825
is the DBD::mysql module.
7772
7827
Perl, and the DBD::MySQL module for DBI must be installed if you
7773
want to run the MySQL benchmark scripts; see Section 7.12.2, "The
7828
want to run the MySQL benchmark scripts; see Section 8.12.2, "The
7774
7829
MySQL Benchmark Suite." They are also required for the MySQL
7775
Cluster ndb_size.pl utility; see Section 16.4.21, "ndb_size.pl ---
7830
Cluster ndb_size.pl utility; see Section 17.4.21, "ndb_size.pl ---
7776
7831
NDBCLUSTER Size Requirement Estimator."