centos6.5编译调试mysql-5.7.18

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos6.5编译调试mysql-5.7.18相关的知识,希望对你有一定的参考价值。

 

下载mysql-community-5.7.18-1.el6.src.rpm

# rpm -ivh mysql-community-5.7.18-1.el6.src.rpm

会安装在同级目录下的rpmbuild文件夹

进入SOURCES目录,解压mysql-5.7.18.tar.gz

# cd mysql-5.7.18

# mkdir debug && cd debug

# cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DMYSQL_DATADIR=/usr/local/mysql/data \
-DWITH_BOOST=/root/rpmbuild/SOURCES \
-DSYSCONFDIR=/etc \
-DEFAULT_CHARSET=utf8mb4 \
-DDEFAULT_COLLATION=utf8mb4_general_ci \
-DENABLED_LOCAL_INFILE=1 \
-DEXTRA_CHARSETS=all \
-DWITH_DEBUG=ON \
-DENABLED_LOCAL_INFILE=ON \
-DWITH_INNODB_MEMCACHED=ON

# make && make install

# cat my.cnf

# Generated by Percona Configuration Wizard (http://tools.percona.com/) version REL5-20120208
# Configuration name server-176 generated for [email protected] at 2017-08-19 13:42:35

[mysql]

# CLIENT #
port = 3306
socket = /usr/local/mysql/data/mysql.sock

[mysqld]

# GENERAL #
user = mysql
#default-storage-engine = InnoDB
character_set_server = utf8
socket = /usr/local/mysql/data/mysql.sock
pid-file = /usr/local/mysql/data/mysql.pid

# MyISAM #
key-buffer-size = 32M
#myisam-recover = FORCE,BACKUP

# SAFETY #
max-allowed-packet = 16M
max-connect-errors = 1000000
skip-name-resolve
sql-mode = STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY
sysdate-is-now = 1
innodb = FORCE

# DATA STORAGE #
datadir = /usr/local/mysql/data/

# BINARY LOGGING #
log-bin = /usr/local/mysql/data/mysql-bin
expire-logs-days = 14
sync-binlog = 1
server-id = 1
# CACHES AND LIMITS #
tmp-table-size = 32M
max-heap-table-size = 32M
query-cache-type = 0
query-cache-size = 0
max-connections = 500
thread-cache-size = 50
open-files-limit = 65535
table-definition-cache = 1024
table-open-cache = 2048

# INNODB #
innodb_data_file_path = ibdata1:1024M:autoextend
innodb-flush-method = O_DIRECT
innodb-log-files-in-group = 2
innodb-log-file-size = 128M
innodb-flush-log-at-trx-commit = 1
innodb-file-per-table = 1
innodb-buffer-pool-size = 512M

# LOGGING #
log-error = /usr/local/mysql/data/mysql-error.log
log-queries-not-using-indexes = 1
slow-query-log = 1
slow-query-log-file = /usr/local/mysql/data/mysql-slow.log

# ./bin/mysqld --initialize  --basedir=/usr/local/mysql/ --user=mysql --datadir=/usr/local/mysql/data/

修改root密码   alter  user  [email protected] identified by ‘123456‘

# mysqld --debug --console &

执行相关操作 select 等等

查看/tmp/mysqld.trace

 

| <mysql_ha_cleanup 1083
[email protected]: | >MDL_context::release_transactional_locks
[email protected]: | | >MDL_context::release_locks_stored_before
[email protected]: | | <MDL_context::release_locks_stored_before 4411
[email protected]: | | >MDL_context::release_locks_stored_before
[email protected]: | | <MDL_context::release_locks_stored_before 4411
[email protected]: | <MDL_context::release_transactional_locks 4690
[email protected]: | >mysql_ull_cleanup

 





























































以上是关于centos6.5编译调试mysql-5.7.18的主要内容,如果未能解决你的问题,请参考以下文章

CentOS 6.6 源码编译安装MySQL-5.7.18

源码编译安装mysql5.7.18

源码编译安装Mysql5.7版本

Linux系统MySQL-5.7.18 release版安装指南

Linux 编译安装 Mysql5.7

mysql5.7.18安装