The Performance Schema is mandatory and always compiled in. It is possible to exclude certain parts of the Performance Schema instrumentation. For example, to exclude stage and statement instrumentation, do this:
cmake . \
For more information, see the descriptions of the
CMake options in
Section 2.9.4, “MySQL Source-Configuration Options”.
If you install MySQL over a previous installation that was
configured without the Performance Schema (or with an older
version of the Performance Schema that may not have all the
current tables), run mysql_upgrade after
starting the server to ensure that the
performance_schema database exists with all
current tables. Then restart the server. One indication that you
need to do this is the presence of messages such as the
following in the error log:
[ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure ...
To verify whether a server was built with Performance Schema
support, check its help output. If the Performance Schema is
available, the output will mention several variables with names
that begin with
mysqld --verbose --help... --performance_schema Enable the performance schema. --performance_schema_events_waits_history_long_size=# Number of rows in events_waits_history_long. ...
SHOW ENGINES\G... Engine: PERFORMANCE_SCHEMA Support: YES Comment: Performance Schema Transactions: NO XA: NO Savepoints: NO ...
If the Performance Schema was not configured into the server at
build time, no row for
PERFORMANCE_SCHEMA will appear in
the output from
SHOW ENGINES. You
performance_schema listed in the
SHOW DATABASES, but
it will have no tables and you will not be able to use it.
A line for
SHOW ENGINES output means
that the Performance Schema is available, not that it is
enabled. To enable it, you must do so at server startup, as
described in the next section.