系列文章目录
rpmbuild入门
文章目录
- 系列文章目录
- 前言
- 一、准备工作
- 1、mysql-5.7.42源码包下载
- 2、准备mycnf配置文件
- 3、mysqld.server配置文件准备
- 4、检查服务器的cmake版本和gcc版本
- 5、服务器安装依赖
- 二、编译构建
- 0、rpmbuild目录树示例
- 1、spec文件拆分解释
- 2、源码包解压部分
- 3、源码包编译构建
- 4、安装阶段
- 5、文件相关操作
- 6、定义rpm包安装后执行的操作
- 7、卸载rpm包后执行的操作
- 三、成果演示
- 1、RPM包构建过程及构建完成示例
- 2、安装编译构建好的RPM包
- 3、进程检查、配置文件、重启验证
- 4、连接mysql并使用
- 总结
前言
因为公司现有环境使用的mysql版本为mysql-5.7.32版本,比较落后,最近客户的几次漏扫总会扫出相应的mysql漏洞,在客户的强烈要求下必须要对mysql进行版本升级操作,但是直接从5.7升至8.0版本不太现实,因为两者不仅在配置文件及语法上有差异,同时功能上也有不同,而且客户侧也没有特别熟悉8.0版本的DBA,因此,接着使用5.7大版本,小版本跟客户协商确认后使用5.7.42版本。为了保证能在现有环境中5.7.42顺利运行并且功能能正常使用,先在测试环境选用一台机器对5.7.42-boost.tar.gz源码包进行编译构建、安装调试测试性能。
提示:以下构建环境使用的是centos7.6-x86_64架构,服务器规格是4c8g 100G(系统盘)/200G(数据盘),服务器能通外网,需要下载一些依赖
一、准备工作
1、mysql-5.7.42源码包下载
rpmbuild环境搭建不在此描述,详情请看顶部链接文件rpmbuild入门
#进入到rpmbuild存放源码文件的SOURCES目录下,下载带有boost库文件的源码包,如下所示
[root@python2 SOURCES]# https://downloads.mysql.com/archives/get/p/23/file/mysql-boost-5.7.42.tar.gz
注意:如果你不下载携带boost库文件的源码包,则需要自行下载mysql对应的boost库文件才能完成编译构建,因为这是mysql的一个依赖,因此,为了节约时间,直接下载图片中的这个即可
2、准备mycnf配置文件
可以将现运行5.7.32的cnf文件copy一份至SOURCES目录下,需要对cnf配置文件进行调整,因为5.7.32和5.7.42版本之间的cnf文件存在不同点,具体不同点看下方示例
下方示例的cnf配置文件仅供参考
[client]
port = MY_PORT
socket = /export/servers/data/myMY_PORT/run/mysqld.sock
[mysqld]
port = MY_PORT
socket = /export/servers/data/myMY_PORT/run/mysqld.sock
datadir = /export/servers/data/myMY_PORT/data
pid_file = /export/servers/data/myMY_PORT/run/mysqld.pid
bind_address = 0.0.0.0
lower_case_table_names = 1
collation_server = utf8_bin
character_set_server = utf8
skip_name_resolve
skip_external_locking
#explicit_defaults_for_timestamp=0
log_bin_trust_function_creators = 1
tmp_table_size = 24M
tmpdir = /export/servers/data/myMY_PORT/tmp
back_log = 1024
max_connections = 1000
#max_user_connections = 80
max_connect_errors = 2000
table_open_cache = 20480
table_definition_cache = 20480
table_open_cache_instances = 16
open_files_limit = 655340
binlog_cache_size = 512K
bulk_insert_buffer_size = 64M
ft_min_word_len = 4
join_buffer_size = 6M
key_buffer_size = 32M
max_allowed_packet = 1024M
max_heap_table_size = 32M
#myisam_repair_threads = 1
myisam_sort_buffer_size = 24M
read_buffer_size = 2M
read_rnd_buffer_size = 3M
sort_buffer_size = 4M
thread_cache_size = 512
thread_stack = 192K
sql_mode = NO_ENGINE_SUBSTITUTION
# log
general_log = off
general_log_file = /export/servers/data/myMY_PORT/log/general-log.log
log_error_verbosity = 3
log_error = /export/servers/data/myMY_PORT/log/mysqld-err.log
log_timestamps = SYSTEM
slow_query_log = on
slow_query_log_file = /export/servers/data/myMY_PORT/log/mysqld-slow.log
long_query_time = 2
log_slow_admin_statements = on
log_slow_slave_statements = on
#binlog_rows_query_log_events = on
# replication
read_only=1
super_read_only=1
log_slave_updates
skip_slave_start
slave_compressed_protocol = off
transaction_write_set_extraction = off
slave_parallel_type = LOGICAL_CLOCK
slave_preserve_commit_order = ON
binlog_checksum = CRC32
#binlog_group_commit_sync_delay = 50
#binlog_group_commit_sync_no_delay_count =100
binlog_format = row
binlog_row_image = full
expire_logs_days = 7
gtid_mode = on
enforce_gtid_consistency = on
gtid_executed_compression_period = 1000
log-bin = /export/servers/data/myMY_PORT/binlog/mysql-bin
relay_log = /export/servers/data/myMY_PORT/binlog/mysqld-relay-bin
master_info_repository = table
relay_log_info_repository = table
server-id = pattern_serverid
slave_net_timeout = 60
#slave_checkpoint_group = 512
#slave_checkpoint_period = 300
slave_load_tmpdir = /export/servers/data/myMY_PORT/tmp
slave_parallel_workers = 4
slave_pending_jobs_size_max = 128M
sync_binlog = 1
report_port = MY_PORT
#report_host = pattern_ip
default_storage_engine = InnoDB
disabled_storage_engines = "MyISAM,MEMORY"
# innodb
innodb_print_all_deadlocks
innodb_autoextend_increment = 64
innodb_buffer_pool_dump_at_shutdown = on
innodb_buffer_pool_load_at_startup = on
innodb_buffer_pool_instances = 4
innodb_buffer_pool_size = 1G
innodb_data_file_path = ibdata1:64M:autoextend
innodb_data_home_dir = /export/servers/data/myMY_PORT/ibdata
innodb_fast_shutdown = 1
innodb_file_per_table = 1
innodb_flush_log_at_trx_commit = 1
innodb_flush_method = O_DIRECT
innodb_flush_neighbors = 0
#innodb_io_capacity = 3000
innodb_io_capacity_max = 1000
innodb_lock_wait_timeout = 50
innodb_log_buffer_size = 32M
innodb_log_file_size = 500M
innodb_log_files_in_group = 4
innodb_log_group_home_dir = /export/servers/data/myMY_PORT/iblog
innodb_max_dirty_pages_pct = 75
innodb_online_alter_log_max_size = 1342177280
innodb_open_files = 64535
innodb_purge_threads = 4
#innodb_read_io_threads = 16
innodb_sort_buffer_size = 4M
innodb_thread_concurrency = 0
innodb_undo_directory = /export/servers/data/myMY_PORT/iblog
innodb_undo_logs = 128
innodb_undo_tablespaces = 2
innodb_write_io_threads = 16
innodb_file_format = Barracuda
innodb_file_format_max = Barracuda
transaction_isolation = READ-COMMITTED
secure_file_priv =
# plugin
plugin_load = rpl_semi_sync_master=semisync_master.so;rpl_semi_sync_slave=semisync_slave.so
# Semi_sync
rpl_semi_sync_master_enabled = 1
rpl_semi_sync_slave_enabled = 1
rpl_semi_sync_master_timeout = 1000
rpl_semi_sync_master_wait_point = AFTER_SYNC
rpl_semi_sync_master_wait_no_slave = off
rpl_semi_sync_master_wait_for_slave_count = 1
[mysqldump]
quick
max_allowed_packet = 256M
[mysql]
no-auto-rehash
prompt=\\u@\\v \\d \\r:\\m:\\s>
default-character-set=utf8
注意事项: 具体5.7.42有哪些参数可以使用,详情见https://mysql-params.tmtms.net/variable/?vers=5.7.42,5.7.32&plugin=true
所以,当有拿不准的参数时,就去该网站进行查询比对,我上述提供的配置文件仅供参考
3、mysqld.server配置文件准备
和cnf配置文件一样,copy现有环境中的文件进行部分修改即可,或者最后拷贝编译好的也可以,此处为了构建省事采用现有环境的文件
sleep 1
user=mysql
basedir=/xxx #修改为自己定义好的安装目录,此处的安装目录必须和cmake时的目录路径一致,否则执行rpm安装时会报错
bindir=$basedir/bin
datadir=/xxx #修改为定义好的数据目录
mysql_data_basedir="/xxx"
mycnf=$mysql_data_basedir/my3306/my.cnf #cnf配置文件目录
lockdir='/var/lock/subsys'
lock_file_path="$lockdir/$user"
service_startup_timeout=900
....
其余的部分和通用的mysqld.server一致,此处不再展示
4、检查服务器的cmake版本和gcc版本
cmake版本不能低于3.5版本,如果低于则需要升级
为了源码构建过程中少踩坑,我选择对该服务器的cmke和gcc进行升级操作,具体升级方法可以访问https://blog.csdn.net/weixin_50902636/article/details/141404879这篇博客,该文件开头就写了升级的过程
[root@python2 SOURCES]# gcc --version
gcc (GCC) 11.2.1 20220127 (Red Hat 11.2.1-9)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[root@python2 SOURCES]# cmake --version
cmake3 version 3.17.5
CMake suite maintained and supported by Kitware (kitware.com/cmake).
5、服务器安装依赖
[root@python1 servers]# yum install -y vim rsync lrzsz expect make bison gcc gcc-c++ bc libaio libaio-devel zlib zlib-devel \
nc python python-devel ncurses-devel sysstat perl-DBI perl-DBD-mysql perl-Time-HiRes perl-ExtUtils-CBuilder \
perl-CPAN perl-Parallel-ForkManager perl-Config-IniFiles MySQL-python.x86_64 perl-Config-Tiny \
perl-Log-Dispatch pigz trickle iftop dos2unix libarchive python-argparse libev numactl numactl-devel \
libconfuse apr python-paramiko tmpwatch python-setuptools cmake3 net-tools
至此,准备工作完成,接下来编写spec文件,进行源码编译构建
二、编译构建
可以先阅读顶部文件rpmbuild入门,对rpmbuild有个大体了解,这样才能看懂这部分写的是什么
0、rpmbuild目录树示例
SOURCES目录存放示例
1、spec文件拆分解释
定义阶段
%define __spec_install_post %{nil} #定义在安装后不执行任何操作。
%define debug_package %{nil} #不生成调试信息包。
%define _build_id_links none #不生成构建ID链接。
%define InstallPath /export/servers/app/mysql-5.7.42 #定义安装路径,必须和cnf配置文件中一致
%define Mycnf mysqld.cnf-5.7 #定义所需要的cnf文件
%define mysqlServer pattern-mysqld.server #定义所需要的启动文件
Name: city-mysql5.7.42 #rpm包名
Version: 1 #版本信息
Release: 1 #构建信息
Summary: mysql5.7.42 install
Group: applications/database
License: GPL
URL: https://downloads.mysql.com/archives/get/p/23/file/mysql-boost-5.7.42.tar.gz
Source0: mysql-boost-5.7.42.tar.gz #引用源码文件
Source1: %{Mycnf}
Source2: %{mysqlServer}
Requires: /bin/sh #构建所需要的
AutoReq: no #不依赖系统相关文件
%description
mysql-5.7.42 install rpm
踩坑点:
必须添加这个参数 %define debug_package %{nil}
当时第一次执行构建时,没有添加这个参数,导致在编译和安装时,报调试器相关错误
In file included from /home/abuild/rpmbuild/BUILD/xxx../src/xxx.cpp:24:0:
[ 10s] /home/abuild/rpmbuild/BUILD/xxxx:65:1: error: 'MessagingMsgStart' wxxxxx
[ 10s] make[2]: *** [CMakeFiles/osp-messaging.dir/src/FMsg_MessagingMessageTypes.cpp.o] Error 1
[ 10s] make[2]: *** Waiting for unfinished jobs....
2、源码包解压部分
该部分会读取SOURCES目录下的源码包,并执行解压过程,将其源码包解压到BUILD目录下
%prep
%setup -q -n mysql-5.7.42 #-n 指定源码包解压后的目录名称
3、源码包编译构建
该部分会在rpmbuild/BUILD/源码包解压后的目录/ 下进行编译构建过程
%build
cmake . -DCMAKE_INSTALL_PREFIX=%{InstallPath} \ #指定编译安装目录
-DDEFAULT_CHARSET=utf8 \ #指定数据库字符集
-DDEFAULTCOLLATION=utf8_bin \ #指定数据库排序规则
-DEXTRA_CHARSETS=all \ # 包含所有额外字符集
-DWITH_MYISAM_STORAGE_ENGINE=1 \ #启用MyISAM存储引擎
-DWITH_INNOBASE_STORAGE_ENGINE=1 \ #启动Innodb存储引擎
-DWITH_ARCHIVE_STORAGE_ENGINE=1 \ #启用Archive存储引擎
-DWITH_PARTITION_STORAGE_ENGINE=1 \ #启用Partition存储引擎
-DENABLED_LOCAL_INFILE=1 \ #启用本地文件导入
-DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \ #启用Performance Schema存储引擎
-DFORCE_INSOURCE_BUILD=1 \ #强制在源代码目录下构建
-DWITH_BOOST=/export/rpmbuild/BUILD/mysql-5.7.42/boost/boost_1_59_0 \ #指定Boost库的路径
-DWITH_NUMA=ON \ #启用NUMA支持
-DINSTALL_MYSQLTESTDIR=OFF #不安装mysql测试目录
make -j 4 #编译 -j代码使用服务器中的几个cpu
踩坑点:
CMake Error at cmake/boost.cmake:103 (MESSAGE):
You can download it with -DDOWNLOAD_BOOST=1 -DWITH_BOOST=<directory>
This CMake script will look for boost in <directory>. If it is not there,
it will download and unpack it (in that directory) for you.
If you are inside a firewall, you may need to use an https proxy:
export https_proxy=http://example.com:80
Call Stack (most recent call first):
cmake/boost.cmake:189 (COULD_NOT_FIND_BOOST)
CMakeLists.txt:836 (INCLUDE)
-- Configuring incomplete, errors occurred!
See also "/export/rpmbuild/BUILD/mysql-8.0.16/CMakeFiles/CMakeOutput.log".
See also "/export/rpmbuild/BUILD/mysql-8.0.16/CMakeFiles/CMakeError.log".
error: Bad exit status from /var/tmp/rpm-tmp.Y2jDXq (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.Y2jDXq (%build)
上述问题解决方法:
必须添加-DWITH_BOOST=/export/rpmbuild/BUILD/mysql-5.7.42/boost/boost_1_59_0 参数,指定boost库文件,否则编译报错,会提示让你添加这个参数或者是-DDOWNLOAD_BOOST=1这个自动下载boost库文件的参数。因为我们下载的是带有boost库文件的源码包,因此使用第一种参数指定位置即可
4、安装阶段
读取位于 %_builddir 构建目录下的文件并将其安装至 %_buildrootdir 目录
%install
make install DESTDIR=%{buildroot} #指定安装目录为BUILDROOT目录
5、文件相关操作
这个阶段会将 %buildroot 目录的相关文件制作成rpm软件包最终放到 %rpmdir 目录里即RPMS目录下
%files阶段有两个特性:
1、%{buildroot}里的所有文件都要明确被指定是否要被打包到rpm里。什么意思呢?假如,%{buildroot}目录下有4个目录a、b、c和d,在%files里仅指定a和b要打包到rpm里,如果不把c和d用exclude声明是要报错的;
2、如果声明了%{buildroot}里不存在的文件或者目录也会报错
因此这里就要写清楚你的%buildroot目录中都包含哪些文件或目录
%files
%defattr(-, root, root) #设置文件的默认权限(这里是默认),文件拥有者和文件组
%attr(755, root, root) %{InstallPath}/* #设置指定路径下所有文件的权限为 755(即可读、可写、可执行),文件拥有者和文件组均为 root
6、定义rpm包安装后执行的操作
这个阶段通常用于安装rpm后,执行启动程序或者是创建相关文件等操作
此处这个阶段主要用于安装rpm包后,创建数据库的数据目录、执行数据库的初始化操作并设置root密码、创建数据目录的属主属组并授权以及配置mysql的启动等。因此这些操作只有在rpm安装后才能执行,因此在此阶段执行
%post -p /bin/sh
#!/bin/sh
#****************************************************************#
#****************************************************************#
#初始化mysql实例,默认端口3306
#指定mysql的服务端口,可以更改成所需的端口号
mysql_port=3306
# 以下参数用来指定mysql实例的数据目录,日志目录等
cur_dir=/export/servers/app/mysql-5.7.42
mysql_softdir=/export/servers/app
base_dir=/export/servers/data/my$mysql_port
mysql_data_dir=$base_dir/data
mysql_log_dir=$base_dir/log
mysql_binlog_dir=$base_dir/binlog
mysql_iblog_dir=$base_dir/iblog
mysql_ibdata_dir=$base_dir/ibdata
mysql_tmp_dir=$base_dir/tmp
mysql_run_dir=$base_dir/run
CURRENT_NODE=`ip addr | grep inet | grep -Pv 'lo$' | grep global | awk '{print $2}' | sed 's#/.*##' | head -1`
server_id=`echo $CURRENT_NODE | awk -F. '{print$4}'`$mysql_port
mysql_cnf=$base_dir/my.cnf
passwd=0gvzJr66iNs5
mysqlcmd="$mysql_softdir/mysql-5.7.42/bin/mysql -uroot -S $mysql_run_dir/mysqld.sock"
usernum=`cat /etc/passwd | grep mysql | wc -l`
add_sys_user(){
#create user mysql
if [ $usernum -ge 1 ];
then
/usr/sbin/userdel mysql
fi
/usr/sbin/groupadd myinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -c "Mysql software owner" -g myinstall -G myinstall,dba mysql -s /sbin/nologin
chmod 755 /home/mysql
}
#初始化mysql
init_mysql(){
if test -d $base_dir ;
then
echo "Datadir $base_dir has been existed, please check "
else
echo "Datadir $base_dir will been created,instance install will continue"
mkdir -p $base_dir/{data,log,binlog,iblog,ibdata,tmp,run}
cp -rp %{SOURCE1} $mysql_cnf
cp -rp %{SOURCE2} /etc/init.d/mysql$mysql_port.server
chown -R mysql:myinstall $base_dir
fi
#change my.cnf
sed -i "s/MY_PORT/$mysql_port/g" $mysql_cnf
sed -i "s/pattern_serverid/$server_id/" $mysql_cnf
sed -i "s/pattern_ip/$CURRENT_NODE/" $mysql_cnf
sed -i "s/MY_PORT/$mysql_port/g" /etc/init.d/mysql$mysql_port.server
chmod 755 /etc/init.d/mysql$mysql_port.server
chkconfig mysql$mysql_port.server on
#init instancce
$mysql_softdir/mysql-5.7.42/bin/mysqld --defaults-file=$mysql_cnf --user=mysql --initialize-insecure
#start mysql
/etc/init.d/mysql$mysql_port.server start
process_count=`ps aux | grep mysqld | grep -v grep | grep $mysql_cnf -c`
if [ $process_count != 2 ];
then
echo 'mysqld process is not enough,please check!!!'
exit 222
fi
}
#更改root密码
create_mysql_user(){
$mysqlcmd -e "set global super_read_only=0;set global read_only=0;"
$mysqlcmd -e "update mysql.user set authentication_string=PASSWORD(\"$passwd\") where user='root';flush privileges; reset master;"
cat << EOF >>$mysql_log_dir/mysql_login.log
1. mysql进程可以使用systemctl启停;
2. mysql未设置开机自启;
3. mysql登陆方式:mysql -uroot -p -S $mysql_run_dir/mysqld.sock
4. 建议修改root密码
5. 参数文件中设置为只读(read_only=1 super_read_only=1),如需要请将参数值该为零。
EOF
add_profile(){
cat << EOF >>/etc/profile
export MYSQL_HOME=%{InstallPath}
export PATH=\$MYSQL_HOME/bin:\$PATH
EOF
source /etc/profile
cat <<EOF >/etc/systemd/system/mysql$mysql_port.service
[Unit]
Description=Deamon of mysql $mysql_port
After=syslog.target
[Service]
LimitNOFILE=102400
Type=forking
ExecStart=/etc/init.d/mysql$mysql_port.server start
ExecStop=$mysql_softdir/mysql-5.7.42/bin/mysqladmin --defaults-file=$mysql_cnf -uroot shutdown
ExecReload=/etc/init.d/mysql$mysql_port.server restart
Restart=always
[Install]
WantedBy=multi-user.target
EOF
chmod 755 /etc/systemd/system/mysql$mysql_port.service
systemctl daemon-reload
systemctl disable mysql$mysql_port.service
main(){
#添加系统用户 mysql
add_sys_user
#创建和初始化mysql实例
init_mysql
#修改root密码
create_mysql_user
#修改环境变量
add_profile
echo "Install successful!!!"
echo -e "The Password of mysql user root is : $passwd"
cat $mysql_log_dir/mysql_login.log
echo -e " "
}
main
set +x
7、卸载rpm包后执行的操作
这个阶段主要用于卸载rpm包后的一些操作,例如删除对应的用户、删除安装目录等操作
此处主要用于在卸载rpm包后,对安装目录的一个清理操作
%postun -p /bin/sh
#!/bin/sh
#****************************************************************#
#删除mysql软件安装目录
mysql_softdir=/export/servers/app
uninstall_mysql(){
if test -d $mysql_softdir/mysql-5.7.42 ;
then
echo "The mysql soft will be move !!!"
rm -rf $mysql_softdir/mysql-5.7.42
else
echo "The host do not install mysql!!"
echo " "
fi
}
uninstall_mysql
以上,就是对整体spec文件分段进行的一个解释,希望能帮助到大家
三、成果演示
1、RPM包构建过程及构建完成示例
2、安装编译构建好的RPM包
安装完成后会自动启动
[root@python2 SPECS]# rpm -ivh ../RPMS/x86_64/city-mysql5.7.42-1-1.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:city-mysql5.7.42-1-1 ################################# [100%]
useradd: warning: the home directory already exists.
Not copying any file from skel directory into it.
Creating mailbox file: File exists
Datadir /export/servers/data/my3306 will been created,instance install will continue
Starting MySQL..... SUCCESS!
Install successful!!!
The Password of mysql user root is : 0gvzJr66iNs5
1. mysql进程可以使用systemctl启停;
2. mysql未设置开机自启;
3. mysql登陆方式:mysql -uroot -p -S /export/servers/data/my3306/run/mysqld.sock
4. 建议修改root密码
5. 参数文件中设置为只读(read_only=1 super_read_only=1),如需要请将参数值该为零。
3、进程检查、配置文件、重启验证
检查文件属性、检查进程
使用目录树查看mysql的安装目录和数据存放目录,如下所示
[root@python2 servers]# tree .
.
├── app
│ └── mysql-5.7.42
│ ├── bin
│ │ ├── innochecksum
│ │ ├── lz4_decompress
│ │ ├── myisamchk
│ │ ├── myisam_ftdump
│ │ ├── myisamlog
│ │ ├── myisampack
│ │ ├── my_print_defaults
│ │ ├── mysql
│ │ ├── mysqladmin
│ │ ├── mysqlbinlog
│ │ ├── mysqlcheck
│ │ ├── mysql_client_test
│ │ ├── mysql_client_test_embedded
│ │ ├── mysql_config
│ │ ├── mysql_config_editor
│ │ ├── mysqld
│ │ ├── mysqld_multi
│ │ ├── mysqld_safe
│ │ ├── mysqldump
│ │ ├── mysqldumpslow
│ │ ├── mysql_embedded
│ │ ├── mysqlimport
│ │ ├── mysql_install_db
│ │ ├── mysql_plugin
│ │ ├── mysqlpump
│ │ ├── mysql_secure_installation
│ │ ├── mysqlshow
│ │ ├── mysqlslap
│ │ ├── mysql_ssl_rsa_setup
│ │ ├── mysqltest
│ │ ├── mysqltest_embedded
│ │ ├── mysql_tzinfo_to_sql
│ │ ├── mysql_upgrade
│ │ ├── mysqlxtest
│ │ ├── perror
│ │ ├── replace
│ │ ├── resolveip
│ │ ├── resolve_stack_dump
│ │ └── zlib_decompress
│ ├── docs
│ │ ├── ChangeLog
│ │ ├── INFO_BIN
│ │ ├── INFO_SRC
│ │ └── mysql.info
│ ├── include
│ │ ├── big_endian.h
│ │ ├── binary_log_types.h
│ │ ├── byte_order_generic.h
│ │ ├── byte_order_generic_x86.h
│ │ ├── decimal.h
│ │ ├── errmsg.h
│ │ ├── keycache.h
│ │ ├── little_endian.h
│ │ ├── m_ctype.h
│ │ ├── m_string.h
│ │ ├── my_alloc.h
│ │ ├── my_byteorder.h
│ │ ├── my_command.h
│ │ ├── my_compiler.h
│ │ ├── my_config.h
│ │ ├── my_dbug.h
│ │ ├── my_dir.h
│ │ ├── my_getopt.h
│ │ ├── my_global.h
│ │ ├── my_list.h
│ │ ├── mysql
│ │ │ ├── client_authentication.h
│ │ │ ├── client_plugin.h
│ │ │ ├── client_plugin.h.pp
│ │ │ ├── com_data.h
│ │ │ ├── get_password.h
│ │ │ ├── group_replication_priv.h
│ │ │ ├── innodb_priv.h
│ │ │ ├── mysql_lex_string.h
│ │ │ ├── plugin_audit.h
│ │ │ ├── plugin_audit.h.pp
│ │ │ ├── plugin_auth_common.h
│ │ │ ├── plugin_auth.h
│ │ │ ├── plugin_auth.h.pp
│ │ │ ├── plugin_ftparser.h
│ │ │ ├── plugin_ftparser.h.pp
│ │ │ ├── plugin_group_replication.h
│ │ │ ├── plugin.h
│ │ │ ├── plugin_keyring.h
│ │ │ ├── plugin_keyring.h.pp
│ │ │ ├── plugin_trace.h
│ │ │ ├── plugin_validate_password.h
│ │ │ ├── psi
│ │ │ │ ├── mysql_file.h
│ │ │ │ ├── mysql_idle.h
│ │ │ │ ├── mysql_mdl.h
│ │ │ │ ├── mysql_memory.h
│ │ │ │ ├── mysql_ps.h
│ │ │ │ ├── mysql_socket.h
│ │ │ │ ├── mysql_sp.h
│ │ │ │ ├── mysql_stage.h
│ │ │ │ ├── mysql_statement.h
│ │ │ │ ├── mysql_table.h
│ │ │ │ ├── mysql_thread.h
│ │ │ │ ├── mysql_transaction.h
│ │ │ │ ├── psi_base.h
│ │ │ │ ├── psi.h
│ │ │ │ └── psi_memory.h
│ │ │ ├── service_command.h
│ │ │ ├── service_locking.h
│ │ │ ├── service_my_plugin_log.h
│ │ │ ├── service_my_snprintf.h
│ │ │ ├── service_mysql_alloc.h
│ │ │ ├── service_mysql_keyring.h
│ │ │ ├── service_mysql_password_policy.h
│ │ │ ├── service_mysql_string.h
│ │ │ ├── service_parser.h
│ │ │ ├── service_rpl_transaction_ctx.h
│ │ │ ├── service_rpl_transaction_write_set.h
│ │ │ ├── service_rules_table.h
│ │ │ ├── service_security_context.h
│ │ │ ├── services.h
│ │ │ ├── services.h.pp
│ │ │ ├── service_srv_session.h
│ │ │ ├── service_srv_session_info.h
│ │ │ ├── service_ssl_wrapper.h
│ │ │ ├── service_thd_alloc.h
│ │ │ ├── service_thd_engine_lock.h
│ │ │ ├── service_thd_wait.h
│ │ │ ├── service_thread_scheduler.h
│ │ │ ├── thread_pool_priv.h
│ │ │ └── thread_type.h
│ │ ├── mysql_com.h
│ │ ├── mysql_com_server.h
│ │ ├── mysqld_ername.h
│ │ ├── mysqld_error.h
│ │ ├── mysql_embed.h
│ │ ├── mysql.h
│ │ ├── mysql_time.h
│ │ ├── mysql_version.h
│ │ ├── mysqlx_ername.h
│ │ ├── mysqlx_error.h
│ │ ├── mysqlx_version.h
│ │ ├── my_sys.h
│ │ ├── my_thread.h
│ │ ├── my_thread_local.h
│ │ ├── my_xml.h
│ │ ├── plugin_audit.h
│ │ ├── plugin_ftparser.h
│ │ ├── plugin_group_replication.h
│ │ ├── plugin.h
│ │ ├── plugin_keyring.h
│ │ ├── plugin_validate_password.h
│ │ ├── sql_common.h
│ │ ├── sql_state.h
│ │ ├── sslopt-case.h
│ │ ├── sslopt-longopts.h
│ │ ├── sslopt-vars.h
│ │ ├── thr_cond.h
│ │ ├── thr_mutex.h
│ │ ├── thr_rwlock.h
│ │ └── typelib.h
│ ├── lib
│ │ ├── libmysqlclient.a
│ │ ├── libmysqlclient.so -> libmysqlclient.so.20
│ │ ├── libmysqlclient.so.20 -> libmysqlclient.so.20.3.29
│ │ ├── libmysqlclient.so.20.3.29
│ │ ├── libmysqld.a
│ │ ├── libmysqlservices.a
│ │ ├── pkgconfig
│ │ │ └── mysqlclient.pc
│ │ └── plugin
│ │ ├── adt_null.so
│ │ ├── auth.so
│ │ ├── auth_socket.so
│ │ ├── auth_test_plugin.so
│ │ ├── connection_control.so
│ │ ├── daemon_example.ini
│ │ ├── debug
│ │ ├── group_replication.so
│ │ ├── ha_example.so
│ │ ├── keyring_file.so
│ │ ├── keyring_udf.so
│ │ ├── libdaemon_example.so
│ │ ├── libtest_framework.so
│ │ ├── libtest_services.so
│ │ ├── libtest_services_threaded.so
│ │ ├── libtest_session_detach.so
│ │ ├── libtest_session_info.so
│ │ ├── libtest_session_in_thd.so
│ │ ├── libtest_sql_2_sessions.so
│ │ ├── libtest_sql_all_col_types.so
│ │ ├── libtest_sql_cmds_1.so
│ │ ├── libtest_sql_commit.so
│ │ ├── libtest_sql_complex.so
│ │ ├── libtest_sql_errors.so
│ │ ├── libtest_sql_lock.so
│ │ ├── libtest_sql_processlist.so
│ │ ├── libtest_sql_replication.so
│ │ ├── libtest_sql_shutdown.so
│ │ ├── libtest_sql_sqlmode.so
│ │ ├── libtest_sql_stored_procedures_functions.so
│ │ ├── libtest_sql_views_triggers.so
│ │ ├── libtest_x_sessions_deinit.so
│ │ ├── libtest_x_sessions_init.so
│ │ ├── locking_service.so
│ │ ├── mypluglib.so
│ │ ├── mysql_no_login.so
│ │ ├── mysqlx.so
│ │ ├── qa_auth_client.so
│ │ ├── qa_auth_interface.so
│ │ ├── qa_auth_server.so
│ │ ├── replication_observers_example_plugin.so
│ │ ├── rewrite_example.so
│ │ ├── rewriter.so
│ │ ├── semisync_master.so
│ │ ├── semisync_slave.so
│ │ ├── test_security_context.so
│ │ ├── test_udf_services.so
│ │ ├── udf_example.so
│ │ ├── validate_password.so
│ │ └── version_token.so
│ ├── LICENSE
│ ├── man
│ │ ├── man1
│ │ │ ├── comp_err.1
│ │ │ ├── innochecksum.1
│ │ │ ├── lz4_decompress.1
│ │ │ ├── myisamchk.1
│ │ │ ├── myisam_ftdump.1
│ │ │ ├── myisamlog.1
│ │ │ ├── myisampack.1
│ │ │ ├── my_print_defaults.1
│ │ │ ├── mysql.1
│ │ │ ├── mysqladmin.1
│ │ │ ├── mysqlbinlog.1
│ │ │ ├── mysqlcheck.1
│ │ │ ├── mysql_config.1
│ │ │ ├── mysql_config_editor.1
│ │ │ ├── mysqld_multi.1
│ │ │ ├── mysqld_safe.1
│ │ │ ├── mysqldump.1
│ │ │ ├── mysqldumpslow.1
│ │ │ ├── mysqlimport.1
│ │ │ ├── mysql_install_db.1
│ │ │ ├── mysqlman.1
│ │ │ ├── mysql_plugin.1
│ │ │ ├── mysqlpump.1
│ │ │ ├── mysql_secure_installation.1
│ │ │ ├── mysql.server.1
│ │ │ ├── mysqlshow.1
│ │ │ ├── mysqlslap.1
│ │ │ ├── mysql_ssl_rsa_setup.1
│ │ │ ├── mysql_tzinfo_to_sql.1
│ │ │ ├── mysql_upgrade.1
│ │ │ ├── perror.1
│ │ │ ├── replace.1
│ │ │ ├── resolveip.1
│ │ │ ├── resolve_stack_dump.1
│ │ │ └── zlib_decompress.1
│ │ └── man8
│ │ └── mysqld.8
│ ├── README
│ ├── share
│ │ ├── aclocal
│ │ │ └── mysql.m4
│ │ ├── bulgarian
│ │ │ └── errmsg.sys
│ │ ├── charsets
│ │ │ ├── armscii8.xml
│ │ │ ├── ascii.xml
│ │ │ ├── cp1250.xml
│ │ │ ├── cp1251.xml
│ │ │ ├── cp1256.xml
│ │ │ ├── cp1257.xml
│ │ │ ├── cp850.xml
│ │ │ ├── cp852.xml
│ │ │ ├── cp866.xml
│ │ │ ├── dec8.xml
│ │ │ ├── geostd8.xml
│ │ │ ├── greek.xml
│ │ │ ├── hebrew.xml
│ │ │ ├── hp8.xml
│ │ │ ├── Index.xml
│ │ │ ├── keybcs2.xml
│ │ │ ├── koi8r.xml
│ │ │ ├── koi8u.xml
│ │ │ ├── latin1.xml
│ │ │ ├── latin2.xml
│ │ │ ├── latin5.xml
│ │ │ ├── latin7.xml
│ │ │ ├── macce.xml
│ │ │ ├── macroman.xml
│ │ │ ├── README
│ │ │ └── swe7.xml
│ │ ├── czech
│ │ │ └── errmsg.sys
│ │ ├── danish
│ │ │ └── errmsg.sys
│ │ ├── dictionary.txt
│ │ ├── dutch
│ │ │ └── errmsg.sys
│ │ ├── english
│ │ │ └── errmsg.sys
│ │ ├── errmsg-utf8.txt
│ │ ├── estonian
│ │ │ └── errmsg.sys
│ │ ├── fill_help_tables.sql
│ │ ├── french
│ │ │ └── errmsg.sys
│ │ ├── german
│ │ │ └── errmsg.sys
│ │ ├── greek
│ │ │ └── errmsg.sys
│ │ ├── hungarian
│ │ │ └── errmsg.sys
│ │ ├── innodb_memcached_config.sql
│ │ ├── install_rewriter.sql
│ │ ├── italian
│ │ │ └── errmsg.sys
│ │ ├── japanese
│ │ │ └── errmsg.sys
│ │ ├── korean
│ │ │ └── errmsg.sys
│ │ ├── mysql_security_commands.sql
│ │ ├── mysql_sys_schema.sql
│ │ ├── mysql_system_tables_data.sql
│ │ ├── mysql_system_tables.sql
│ │ ├── mysql_test_data_timezone.sql
│ │ ├── norwegian
│ │ │ └── errmsg.sys
│ │ ├── norwegian-ny
│ │ │ └── errmsg.sys
│ │ ├── polish
│ │ │ └── errmsg.sys
│ │ ├── portuguese
│ │ │ └── errmsg.sys
│ │ ├── romanian
│ │ │ └── errmsg.sys
│ │ ├── russian
│ │ │ └── errmsg.sys
│ │ ├── serbian
│ │ │ └── errmsg.sys
│ │ ├── slovak
│ │ │ └── errmsg.sys
│ │ ├── spanish
│ │ │ └── errmsg.sys
│ │ ├── swedish
│ │ │ └── errmsg.sys
│ │ ├── ukrainian
│ │ │ └── errmsg.sys
│ │ └── uninstall_rewriter.sql
│ └── support-files
│ ├── magic
│ ├── mysqld_multi.server
│ ├── mysql-log-rotate
│ └── mysql.server
└── data
└── my3306
├── binlog
│ ├── mysql-bin.000001
│ ├── mysql-bin.000002
│ ├── mysql-bin.000003
│ └── mysql-bin.index
├── data
│ ├── auto.cnf
│ ├── ca-key.pem
│ ├── ca.pem
│ ├── client-cert.pem
│ ├── client-key.pem
│ ├── mysql
│ │ ├── columns_priv.frm
│ │ ├── columns_priv.MYD
│ │ ├── columns_priv.MYI
│ │ ├── db.frm
│ │ ├── db.MYD
│ │ ├── db.MYI
│ │ ├── db.opt
│ │ ├── engine_cost.frm
│ │ ├── engine_cost.ibd
│ │ ├── event.frm
│ │ ├── event.MYD
│ │ ├── event.MYI
│ │ ├── func.frm
│ │ ├── func.MYD
│ │ ├── func.MYI
│ │ ├── general_log.CSM
│ │ ├── general_log.CSV
│ │ ├── general_log.frm
│ │ ├── gtid_executed.frm
│ │ ├── gtid_executed.ibd
│ │ ├── help_category.frm
│ │ ├── help_category.ibd
│ │ ├── help_keyword.frm
│ │ ├── help_keyword.ibd
│ │ ├── help_relation.frm
│ │ ├── help_relation.ibd
│ │ ├── help_topic.frm
│ │ ├── help_topic.ibd
│ │ ├── innodb_index_stats.frm
│ │ ├── innodb_index_stats.ibd
│ │ ├── innodb_table_stats.frm
│ │ ├── innodb_table_stats.ibd
│ │ ├── ndb_binlog_index.frm
│ │ ├── ndb_binlog_index.MYD
│ │ ├── ndb_binlog_index.MYI
│ │ ├── plugin.frm
│ │ ├── plugin.ibd
│ │ ├── proc.frm
│ │ ├── proc.MYD
│ │ ├── proc.MYI
│ │ ├── procs_priv.frm
│ │ ├── procs_priv.MYD
│ │ ├── procs_priv.MYI
│ │ ├── proxies_priv.frm
│ │ ├── proxies_priv.MYD
│ │ ├── proxies_priv.MYI
│ │ ├── server_cost.frm
│ │ ├── server_cost.ibd
│ │ ├── servers.frm
│ │ ├── servers.ibd
│ │ ├── slave_master_info.frm
│ │ ├── slave_master_info.ibd
│ │ ├── slave_relay_log_info.frm
│ │ ├── slave_relay_log_info.ibd
│ │ ├── slave_worker_info.frm
│ │ ├── slave_worker_info.ibd
│ │ ├── slow_log.CSM
│ │ ├── slow_log.CSV
│ │ ├── slow_log.frm
│ │ ├── tables_priv.frm
│ │ ├── tables_priv.MYD
│ │ ├── tables_priv.MYI
│ │ ├── time_zone.frm
│ │ ├── time_zone.ibd
│ │ ├── time_zone_leap_second.frm
│ │ ├── time_zone_leap_second.ibd
│ │ ├── time_zone_name.frm
│ │ ├── time_zone_name.ibd
│ │ ├── time_zone_transition.frm
│ │ ├── time_zone_transition.ibd
│ │ ├── time_zone_transition_type.frm
│ │ ├── time_zone_transition_type.ibd
│ │ ├── user.frm
│ │ ├── user.MYD
│ │ └── user.MYI
│ ├── performance_schema
│ │ ├── accounts.frm
│ │ ├── cond_instances.frm
│ │ ├── db.opt
│ │ ├── events_stages_current.frm
│ │ ├── events_stages_history.frm
│ │ ├── events_stages_history_long.frm
│ │ ├── events_stages_summary_by_account_by_event_name.frm
│ │ ├── events_stages_summary_by_host_by_event_name.frm
│ │ ├── events_stages_summary_by_thread_by_event_name.frm
│ │ ├── events_stages_summary_by_user_by_event_name.frm
│ │ ├── events_stages_summary_global_by_event_name.frm
│ │ ├── events_statements_current.frm
│ │ ├── events_statements_history.frm
│ │ ├── events_statements_history_long.frm
│ │ ├── events_statements_summary_by_account_by_event_name.frm
│ │ ├── events_statements_summary_by_digest.frm
│ │ ├── events_statements_summary_by_host_by_event_name.frm
│ │ ├── events_statements_summary_by_program.frm
│ │ ├── events_statements_summary_by_thread_by_event_name.frm
│ │ ├── events_statements_summary_by_user_by_event_name.frm
│ │ ├── events_statements_summary_global_by_event_name.frm
│ │ ├── events_transactions_current.frm
│ │ ├── events_transactions_history.frm
│ │ ├── events_transactions_history_long.frm
│ │ ├── events_transactions_summary_by_account_by_event_name.frm
│ │ ├── events_transactions_summary_by_host_by_event_name.frm
│ │ ├── events_transactions_summary_by_thread_by_event_name.frm
│ │ ├── events_transactions_summary_by_user_by_event_name.frm
│ │ ├── events_transactions_summary_global_by_event_name.frm
│ │ ├── events_waits_current.frm
│ │ ├── events_waits_history.frm
│ │ ├── events_waits_history_long.frm
│ │ ├── events_waits_summary_by_account_by_event_name.frm
│ │ ├── events_waits_summary_by_host_by_event_name.frm
│ │ ├── events_waits_summary_by_instance.frm
│ │ ├── events_waits_summary_by_thread_by_event_name.frm
│ │ ├── events_waits_summary_by_user_by_event_name.frm
│ │ ├── events_waits_summary_global_by_event_name.frm
│ │ ├── file_instances.frm
│ │ ├── file_summary_by_event_name.frm
│ │ ├── file_summary_by_instance.frm
│ │ ├── global_status.frm
│ │ ├── global_variables.frm
│ │ ├── host_cache.frm
│ │ ├── hosts.frm
│ │ ├── memory_summary_by_account_by_event_name.frm
│ │ ├── memory_summary_by_host_by_event_name.frm
│ │ ├── memory_summary_by_thread_by_event_name.frm
│ │ ├── memory_summary_by_user_by_event_name.frm
│ │ ├── memory_summary_global_by_event_name.frm
│ │ ├── metadata_locks.frm
│ │ ├── mutex_instances.frm
│ │ ├── objects_summary_global_by_type.frm
│ │ ├── performance_timers.frm
│ │ ├── prepared_statements_instances.frm
│ │ ├── processlist.frm
│ │ ├── replication_applier_configuration.frm
│ │ ├── replication_applier_status_by_coordinator.frm
│ │ ├── replication_applier_status_by_worker.frm
│ │ ├── replication_applier_status.frm
│ │ ├── replication_connection_configuration.frm
│ │ ├── replication_connection_status.frm
│ │ ├── replication_group_members.frm
│ │ ├── replication_group_member_stats.frm
│ │ ├── rwlock_instances.frm
│ │ ├── session_account_connect_attrs.frm
│ │ ├── session_connect_attrs.frm
│ │ ├── session_status.frm
│ │ ├── session_variables.frm
│ │ ├── setup_actors.frm
│ │ ├── setup_consumers.frm
│ │ ├── setup_instruments.frm
│ │ ├── setup_objects.frm
│ │ ├── setup_timers.frm
│ │ ├── socket_instances.frm
│ │ ├── socket_summary_by_event_name.frm
│ │ ├── socket_summary_by_instance.frm
│ │ ├── status_by_account.frm
│ │ ├── status_by_host.frm
│ │ ├── status_by_thread.frm
│ │ ├── status_by_user.frm
│ │ ├── table_handles.frm
│ │ ├── table_io_waits_summary_by_index_usage.frm
│ │ ├── table_io_waits_summary_by_table.frm
│ │ ├── table_lock_waits_summary_by_table.frm
│ │ ├── threads.frm
│ │ ├── users.frm
│ │ ├── user_variables_by_thread.frm
│ │ └── variables_by_thread.frm
│ ├── private_key.pem
│ ├── public_key.pem
│ ├── server-cert.pem
│ ├── server-key.pem
│ └── sys
│ ├── db.opt
│ ├── host_summary_by_file_io.frm
│ ├── host_summary_by_file_io_type.frm
│ ├── host_summary_by_stages.frm
│ ├── host_summary_by_statement_latency.frm
│ ├── host_summary_by_statement_type.frm
│ ├── host_summary.frm
│ ├── innodb_buffer_stats_by_schema.frm
│ ├── innodb_buffer_stats_by_table.frm
│ ├── innodb_lock_waits.frm
│ ├── io_by_thread_by_latency.frm
│ ├── io_global_by_file_by_bytes.frm
│ ├── io_global_by_file_by_latency.frm
│ ├── io_global_by_wait_by_bytes.frm
│ ├── io_global_by_wait_by_latency.frm
│ ├── latest_file_io.frm
│ ├── memory_by_host_by_current_bytes.frm
│ ├── memory_by_thread_by_current_bytes.frm
│ ├── memory_by_user_by_current_bytes.frm
│ ├── memory_global_by_current_bytes.frm
│ ├── memory_global_total.frm
│ ├── metrics.frm
│ ├── processlist.frm
│ ├── ps_check_lost_instrumentation.frm
│ ├── schema_auto_increment_columns.frm
│ ├── schema_index_statistics.frm
│ ├── schema_object_overview.frm
│ ├── schema_redundant_indexes.frm
│ ├── schema_table_lock_waits.frm
│ ├── schema_table_statistics.frm
│ ├── schema_table_statistics_with_buffer.frm
│ ├── schema_tables_with_full_table_scans.frm
│ ├── schema_unused_indexes.frm
│ ├── session.frm
│ ├── session_ssl_status.frm
│ ├── statement_analysis.frm
│ ├── statements_with_errors_or_warnings.frm
│ ├── statements_with_full_table_scans.frm
│ ├── statements_with_runtimes_in_95th_percentile.frm
│ ├── statements_with_sorting.frm
│ ├── statements_with_temp_tables.frm
│ ├── sys_config.frm
│ ├── sys_config.ibd
│ ├── sys_config_insert_set_user.TRN
│ ├── sys_config.TRG
│ ├── sys_config_update_set_user.TRN
│ ├── user_summary_by_file_io.frm
│ ├── user_summary_by_file_io_type.frm
│ ├── user_summary_by_stages.frm
│ ├── user_summary_by_statement_latency.frm
│ ├── user_summary_by_statement_type.frm
│ ├── user_summary.frm
│ ├── version.frm
│ ├── wait_classes_global_by_avg_latency.frm
│ ├── wait_classes_global_by_latency.frm
│ ├── waits_by_host_by_latency.frm
│ ├── waits_by_user_by_latency.frm
│ ├── waits_global_by_latency.frm
│ ├── x@0024host_summary_by_file_io.frm
│ ├── x@0024host_summary_by_file_io_type.frm
│ ├── x@0024host_summary_by_stages.frm
│ ├── x@0024host_summary_by_statement_latency.frm
│ ├── x@0024host_summary_by_statement_type.frm
│ ├── x@0024host_summary.frm
│ ├── x@0024innodb_buffer_stats_by_schema.frm
│ ├── x@0024innodb_buffer_stats_by_table.frm
│ ├── x@0024innodb_lock_waits.frm
│ ├── x@0024io_by_thread_by_latency.frm
│ ├── x@0024io_global_by_file_by_bytes.frm
│ ├── x@0024io_global_by_file_by_latency.frm
│ ├── x@0024io_global_by_wait_by_bytes.frm
│ ├── x@0024io_global_by_wait_by_latency.frm
│ ├── x@0024latest_file_io.frm
│ ├── x@0024memory_by_host_by_current_bytes.frm
│ ├── x@0024memory_by_thread_by_current_bytes.frm
│ ├── x@0024memory_by_user_by_current_bytes.frm
│ ├── x@0024memory_global_by_current_bytes.frm
│ ├── x@0024memory_global_total.frm
│ ├── x@0024processlist.frm
│ ├── x@0024ps_digest_95th_percentile_by_avg_us.frm
│ ├── x@0024ps_digest_avg_latency_distribution.frm
│ ├── x@0024ps_schema_table_statistics_io.frm
│ ├── x@0024schema_flattened_keys.frm
│ ├── x@0024schema_index_statistics.frm
│ ├── x@0024schema_table_lock_waits.frm
│ ├── x@0024schema_table_statistics.frm
│ ├── x@0024schema_table_statistics_with_buffer.frm
│ ├── x@0024schema_tables_with_full_table_scans.frm
│ ├── x@0024session.frm
│ ├── x@0024statement_analysis.frm
│ ├── x@0024statements_with_errors_or_warnings.frm
│ ├── x@0024statements_with_full_table_scans.frm
│ ├── x@0024statements_with_runtimes_in_95th_percentile.frm
│ ├── x@0024statements_with_sorting.frm
│ ├── x@0024statements_with_temp_tables.frm
│ ├── x@0024user_summary_by_file_io.frm
│ ├── x@0024user_summary_by_file_io_type.frm
│ ├── x@0024user_summary_by_stages.frm
│ ├── x@0024user_summary_by_statement_latency.frm
│ ├── x@0024user_summary_by_statement_type.frm
│ ├── x@0024user_summary.frm
│ ├── x@0024wait_classes_global_by_avg_latency.frm
│ ├── x@0024wait_classes_global_by_latency.frm
│ ├── x@0024waits_by_host_by_latency.frm
│ ├── x@0024waits_by_user_by_latency.frm
│ └── x@0024waits_global_by_latency.frm
├── ibdata
│ ├── ib_buffer_pool
│ ├── ibdata1
│ └── ibtmp1
├── iblog
│ ├── ib_logfile0
│ ├── ib_logfile1
│ ├── ib_logfile2
│ ├── ib_logfile3
│ ├── undo001
│ └── undo002
├── log
│ ├── mysqld-err.log
│ ├── mysqld-slow.log
│ └── mysql_login.log
├── my.cnf
├── run
│ ├── mysqld.pid
│ ├── mysqld.sock
│ └── mysqld.sock.lock
└── tmp
4、连接mysql并使用
[root@python2 servers]# mysql -uroot -p -S /export/servers/data/my3306/run/mysqld.sock
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.42-log Source distribution
Copyright (c) 2000, 2023, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
mysql> select version();
+------------+
| version() |
+------------+
| 5.7.42-log |
+------------+
1 row in set (0.00 sec)
mysql> show global variables like "%read_only%";
+-----------------------+-------+
| Variable_name | Value |
+-----------------------+-------+
| innodb_read_only | OFF |
| read_only | OFF |
| super_read_only | OFF |
| transaction_read_only | OFF |
| tx_read_only | OFF |
+-----------------------+-------+
5 rows in set (0.01 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)
mysql> create database ops;
Query OK, 1 row affected (0.01 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| ops |
| performance_schema |
| sys |
+--------------------+
5 rows in set (0.00 sec)
至此,成功安装并初始化了mysql,一切都按照spec文件中%post部分顺利完成。效果演示和使用也没有遇到问题。到此结束!!!
总结
通过rpmbuild构建mysql,不仅熟练了rpmbuild的使用,更了解了源码安装mysql的过程,加深了印象。同时在构建过程中也有遇到不同的问题,但是都通过搜索查询一一解决,如果在构建过程中有遇到问题的小伙伴可以私信留言我们一起探讨解决,因为作为运维的角度出发,rpmbuild编译构建是必备的一项技能,很考验对中间件源码部署过程的考验,如果你不清楚部署过程,那么rpmbuild就是徒劳的!! 同时,在实际维护部署过程中,rpmbuild也是经常使用到的加分项.