码迷,mamicode.com
首页 > 数据库 > 详细

centos6.5编译调试mysql-5.7.18

时间:2017-08-20 16:50:47      阅读:178      评论:0      收藏:0      [点我收藏+]

标签:source   name   cal   相关   mmu   ons   user   lock   led   

 

下载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 892246139@qq.com 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  root@localhost identified by ‘123456‘

# mysqld --debug --console &

执行相关操作 select 等等

查看/tmp/mysqld.trace

 

| <mysql_ha_cleanup 1083
T@4: | >MDL_context::release_transactional_locks
T@4: | | >MDL_context::release_locks_stored_before
T@4: | | <MDL_context::release_locks_stored_before 4411
T@4: | | >MDL_context::release_locks_stored_before
T@4: | | <MDL_context::release_locks_stored_before 4411
T@4: | <MDL_context::release_transactional_locks 4690
T@4: | >mysql_ull_cleanup

 

centos6.5编译调试mysql-5.7.18

标签:source   name   cal   相关   mmu   ons   user   lock   led   

原文地址:http://www.cnblogs.com/sq892246139/p/7400137.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!