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

时间: 2024-10-09 23:06:39

centos6.5编译调试mysql-5.7.18的相关文章

CentOS6 下编译安装 MySQL 5.6.26

CentOS6下通过yum安装的MySQL是5.1版的,比较老,所以就想通过源代码安装高版本的5.6.26. 一:卸载旧版本 使用下面的命令检查是否安装有MySQL Server rpm -qa | grep mysql 有的话通过下面的命令来卸载掉 rpm -e mysql // 普通删除模式 rpm -e --nodeps mysql // 强力删除模式,如果使用上面命令删除时,提示有依赖的其它文件,则用该命令可以对其进行强力删除 二.安装编译MySQL需要的工具 安装g++和gdb yum

CentOS6.5编译安装MySQL 5.7.11

http://mirrors.sohu.com/mysql 安装前工作:1,从官方网址下载MySQL5.7.11源码包,大概49M2,安装好CentOS6.5 64位操作系统.建议update操作系统,以便是此版本最新的3. yum -y install  gcc gcc-c++ autoconf automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel* make cmake  libaio libaio-

Centos6.5 编译安装Mysql 5.5.3.7

1.准备依赖包 yum install gcc* c++ * bison autoconfautomakezlib*  libxml* ncurses-devellibmcrypt* libtool-ltdl-devel* yum install cmake* 2.添加mysql用户和用户组 groupadd mysql useradd -s /sbin/nologin -g mysql 3.创建数组存放目录 Mkdir–R /work/mysqlData 给mysql权限 Chown–R my

centos6.4编译安装mysql

1,对于centos系统,首先需要卸载掉它自带的mysql: 执行如下一连串命令,全部干掉重来! 然后执行:rm  -rf  /etc/my.cnf 删掉mysql的配置文件,如果还存在的话! 2,下载mysql source code 开始编译安装 首先需要安装一些依赖的包: yum  -y  install  cmake  gcc-c++  ncurses-devel cmake是用来编译mysql的工具,这个先安装,之后再安装的过程中,如果报错则继续安装其它依赖包! 开始编译安装,如下:

Linux centos6.5 下编译安装mysql

安装环境 系统:centos6.5_86X64 Mysql: mysql-5.6.16.tar.gz 注意:mysql-5.6.16安装和5.5.5.1不同,编译不再使用./configure来进行,而是使用cmake来编译. 1.新建存放数据的目录 [[email protected] beauty]# mkdir -p /data/mydata 2.新建用户 [[email protected] beauty]# groupadd -r mysql     #新建mysql组 [[email

Linux CentOS6.5下编译安装MySQL 5.6.16【给力详细教程】

一.编译安装MySQL前的准备工作 安装编译源码所需的工具和库 [sql] view plaincopy yum install gcc gcc-c++ ncurses-devel perl 安装cmake,从http://www.cmake.org下载源码并编译安装 [sql] view plaincopy wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz tar -xzvf cmake-2.8.10.2.tar.gz cd 

Linux(CentOS6.5)下编译安装MySQL Community Server 5.7.12

  组件 官方网站 直接下载地址 备注 mysql http://dev.mysql.com/downloads/mysql/ http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-5.7.12.tar.gz mysql源码 CMake https://cmake.org https://cmake.org/files/v3.5/cmake-3.5.2.tar.gz 编译时使用 Boost http://www.boost.org/ http://120.5

Linux CentOS6.5下编译安装MySQL 5.6.29

一.编译安装MySQL前的准备工作 安装编译源码所需的工具和库 [[email protected] ~]# yum install gcc gcc-c++ ncurses-devel perl  安装cmake,从http://www.cmake.org下载源码并编译安装 [[email protected] ~]# wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz    [[email protected] ~]#tar -

Linux CentOS6.5下 源码编译安装MySQL 5.6.16【给力详细教程】

一.编译安装MySQL前的准备工作 安装编译源码所需的工具和库 yum install gcc gcc-c++ ncurses-devel perl 安装cmake,从http://www.cmake.org下载源码并编译安装 wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz tar -xzvf cmake-2.8.10.2.tar.gz cd cmake-2.8.10.2 ./bootstrap ; make ; make i