MySQL Source-Configuration Options
121
should still try to build all clients, but you can ignore any warnings about files such as
mysql.cc
. (If
make
stops, try
make -k
to tell it to continue with the rest of the build even if errors occur.)
• To build the embedded MySQL library (
libmysqld.a
), use the
--with-embedded-
server
[121]
option.
• To place your log files and database directories elsewhere than under
/usr/local/var
, use a
configure
command something like one of these:
shell>
./configure --prefix=/usr/local/mysql
shell>
./configure --prefix=/usr/local \
--localstatedir=/usr/local/mysql/data
The first command changes the installation prefix so that everything is installed under
/usr/
local/mysql
rather than the default of
/usr/local
. The second command preserves the default
installation prefix, but overrides the default location for database directories (normally
/usr/local/
var
) and changes it to
/usr/local/mysql/data
.
You can also specify the installation directory and data directory locations at server startup time by
using the
--basedir
[401]
and
--datadir
[404]
options. These can be given on the command
line or in an MySQL option file, although it is more common to use an option file. See
Section 4.2.3.3,
“Using Option Files”
.
• The
--with-tcp-port
[121]
option specifies the port number on which the server listens
for TCP/IP connections. The default is port 3306. To listen on a different port, use a
configure
command like this:
shell>
./configure --with-tcp-port=3307
• On Unix, if you want the MySQL socket file location to be somewhere other than the default
location (normally in the directory
/tmp
or
/var/run
), use a
configure
command like this:
shell>
./configure \
--with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock
The socket file name must be an absolute path name. You can also change the location of
mysql.sock
at server startup by using a MySQL option file. See
Section C.5.4.5, “How to Protect or
Change the MySQL Unix Socket File”
.
• To compile statically linked programs (for example, to make a binary distribution, to get better
performance, or to work around problems with some Red Hat Linux distributions), run
configure
like this:
shell>
./configure --with-client-ldflags=-all-static \
--with-mysqld-ldflags=-all-static
• If you are using
gcc
and do not have
libg++
or
+
installed, you can tell
configure
to use
gcc
as your C++ compiler:
shell>
CC=gcc CXX=gcc ./configure
When you use
gcc
as your C++ compiler, it does not attempt to link in
libg++
or
+
. This
may be a good thing to do even if you have those libraries installed. Some versions of them have
caused strange problems for MySQL users in the past.
The following list indicates some compilers and environment variable settings that are commonly
used with each one.
•
gcc
2.7.2:
CC=gcc CXX=gcc CXXFLAGS="-O3 -felide-constructors"
•
gcc
2.95.2:
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...