Debugging a MySQL Server
2821
Important
If you are trying to build MySQL 5.0 with
icc
on the IA64 platform, and need
support for MySQL Cluster, you should first ensure that you are using
icc
version 9.1.043 or later. (For details, see Bug #21875.)
To compile only the client, use
./configure --without-server
.
If you want or need to change any
Makefile
or the
configure
script, you also need GNU Automake
and Autoconf. See
Section 2.17.2, “Installing MySQL from a Development Source Tree”
.
All steps needed to remake everything from the most basic files.
/bin/rm */.deps/*.P
/bin/rm -f config.cache
aclocal
autoheader
aclocal
automake
autoconf
./configure --with-debug=full --prefix='your installation directory'
# The makefiles generated above need GNU make 3.75 or newer.
# (called gmake below)
gmake clean all install init-db
If you run into problems with a new port, you may have to do some debugging of MySQL! See
Section 21.3.1, “Debugging a MySQL Server”
.
Note
Before you start debugging
mysqld
, first get the test programs
mysys/
thr_alarm
and
mysys/thr_lock
to work. This ensures that your thread
installation has even a remote chance to work!
21.3.1. Debugging a MySQL Server
If you are using some functionality that is very new in MySQL, you can try to run
mysqld
with the
--
skip-new
(which disables all new, potentially unsafe functionality). See
Section C.5.4.2, “What to Do If
MySQL Keeps Crashing”
.
If
mysqld
doesn't want to start, you should verify that you don't have any
my.cnf
files that interfere
with your setup! You can check your
my.cnf
arguments with
mysqld --print-defaults
and avoid
using them by starting with
mysqld --no-defaults ...
.
If
mysqld
starts to eat up CPU or memory or if it “hangs,” you can use
mysqladmin processlist
status
to find out if someone is executing a query that takes a long time. It may be a good idea to run
mysqladmin -i10 processlist status
in some window if you are experiencing performance
problems or problems when new clients can't connect.
The command
mysqladmin debug
dumps some information about locks in use, used memory and
query usage to the MySQL log file. This may help solve some problems. This command also provides
some useful information even if you haven't compiled MySQL for debugging!
If the problem is that some tables are getting slower and slower you should try to optimize the table
with
OPTIMIZE TABLE
or
myisamchk
. See
Chapter 5, MySQL Server Administration
. You should also
check the slow queries with
EXPLAIN
.
You should also read the OS-specific section in this manual for problems that may be unique to your
environment. See
Section 2.20, “Operating System-Specific Notes”
.
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 ...