MySQL Source-Configuration Options
122
CFLAGS="-O3 -mpentiumpro" CXX=gcc CXXFLAGS="-O3 -mpentiumpro \
-felide-constructors -fno-exceptions -fno-rtti"
In most cases, you can get a reasonably optimized MySQL binary by using the options from the
preceding list and adding the following options to the
configure
line:
--prefix=/usr/local/mysql --enable-assembler \
--with-mysqld-ldflags=-all-static
The full
configure
line would, in other words, be something like the following for all recent
gcc
versions:
CFLAGS="-O3 -mpentiumpro" CXX=gcc CXXFLAGS="-O3 -mpentiumpro \
-felide-constructors -fno-exceptions -fno-rtti" ./configure \
--prefix=/usr/local/mysql --enable-assembler \
--with-mysqld-ldflags=-all-static
The binaries we provide on the MySQL Web site at
http://dev.mysql.com/downloads/
are all compiled
with full optimization and should work well for most users. See
Section 2.16, “Installing MySQL from
Generic Binaries on Other Unix-Like Systems”
.
• If the build fails and produces errors about your compiler or linker not being able to create the shared
library
libmysqlclient.so.N
(where
N
is a version number), you can work around this problem
by giving the
--disable-shared
option to
configure
. In this case,
configure
does not build a
shared
libmysqlclient.so.N
library.
• By default, MySQL uses the
latin1
(cp1252 West European) character set. To change the
default set, use the
--with-charset
[122]
option:
shell>
./configure --with-charset=CHARSET
CHARSET
may be one of
binary
,
armscii8
,
ascii
,
big5
,
cp1250
,
cp1251
,
cp1256
,
cp1257
,
cp850
,
cp852
,
cp866
,
cp932
,
dec8
,
eucjpms
,
euckr
,
gb2312
,
gbk
,
geostd8
,
greek
,
hebrew
,
hp8
,
keybcs2
,
koi8r
,
koi8u
,
latin1
,
latin2
,
latin5
,
latin7
,
macce
,
macroman
,
sjis
,
swe7
,
tis620
,
ucs2
,
ujis
,
utf8
. (Additional character sets might be available. Check the output
from
./configure --help
for the current list.)
The default collation may also be specified. MySQL uses the
latin1_swedish_ci
collation by
default. To change this, use the
--with-collation
[122]
option:
shell>
./configure --with-collation=COLLATION
To change both the character set and the collation, use both the
--with-charset
[122]
and
--
with-collation
[122]
options. The collation must be a legal collation for the character set. (Use
the
SHOW COLLATION
statement to determine which collations are available for each character set.)
With the
configure
option
--with-extra-charsets=LIST
[122]
, you can define which
additional character sets should be compiled into the server.
LIST
is one of the following:
• A list of character set names separated by spaces
•
complex
to include all character sets that can't be dynamically loaded
•
all
to include all character sets into the binaries
Clients that want to convert characters between the server and the client should use the
SET NAMES
statement. See
Section 10.1.4, “Connection Character Sets and Collations”
.
• To configure MySQL with debugging code, use the
--with-debug
[122]
option:
shell>
./configure --with-debug
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...