1.选择版本:mysql-community-server-5.6.20 起开始内置dtrace(但是mysql 8.0 移除)
2.下载:
http://public-yum.oracle.com/
http://public-yum.oracle.com/repo/OracleLinux/OL7/MySQL56/x86_64/index.html下载四个文件
mysql-community-client-5.6.20-4.el7.x86_64.rpm
mysql-community-common-5.6.20-4.el7.x86_64.rpm
mysql-community-server-5.6.20-4.el7.x86_64.rpm
mysql-community-libs-5.6.20-4.el7.x86_64.rpm
3.安装:
rpm -ivh mysql-community-libs-5.6.20-4.el7.x86_64.rpm
rpm -ivh mysql-community-common-5.6.20-4.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.6.20-4.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.6.20-4.el7.x86_64.rpm
4.文件安装位置
[root@server1 data]# rpm -ql mysql-community-server-5.6.20-4.el7.x86_64
/etc/logrotate.d/mysql
/etc/my.cnf
/usr/bin/innochecksum
/usr/bin/my_print_defaults
/usr/bin/myisam_ftdump
/usr/bin/myisamchk
/usr/bin/myisamlog
/usr/bin/myisampack
/usr/bin/mysql-systemd-start
/usr/bin/mysql_convert_table_format
/usr/bin/mysql_fix_extensions
/usr/bin/mysql_install_db
/usr/bin/mysql_plugin
/usr/bin/mysql_secure_installation
/usr/bin/mysql_tzinfo_to_sql
/usr/bin/mysql_upgrade
/usr/bin/mysql_zap
/usr/bin/mysqlbug
/usr/bin/mysqld_multi
/usr/bin/mysqld_safe
/usr/bin/mysqldumpslow
/usr/bin/mysqlhotcopy
/usr/bin/mysqltest
/usr/bin/perror
/usr/bin/replace
/usr/bin/resolve_stack_dump
/usr/bin/resolveip
/usr/lib/systemd/system/mysqld.service
/usr/lib/tmpfiles.d/mysql.conf
/usr/lib64/mysql/plugin
/usr/lib64/mysql/plugin/adt_null.so
/usr/lib64/mysql/plugin/auth.so
/usr/lib64/mysql/plugin/auth_socket.so
/usr/lib64/mysql/plugin/auth_test_plugin.so
/usr/lib64/mysql/plugin/daemon_example.ini
/usr/lib64/mysql/plugin/debug
/usr/lib64/mysql/plugin/debug/adt_null.so
/usr/lib64/mysql/plugin/debug/auth.so
/usr/lib64/mysql/plugin/debug/auth_socket.so
/usr/lib64/mysql/plugin/debug/auth_test_plugin.so
/usr/lib64/mysql/plugin/debug/innodb_engine.so
/usr/lib64/mysql/plugin/debug/libdaemon_example.so
/usr/lib64/mysql/plugin/debug/libmemcached.so
/usr/lib64/mysql/plugin/debug/mypluglib.so
/usr/lib64/mysql/plugin/debug/qa_auth_client.so
/usr/lib64/mysql/plugin/debug/qa_auth_interface.so
/usr/lib64/mysql/plugin/debug/qa_auth_server.so
/usr/lib64/mysql/plugin/debug/semisync_master.so
/usr/lib64/mysql/plugin/debug/semisync_slave.so
/usr/lib64/mysql/plugin/debug/validate_password.so
/usr/lib64/mysql/plugin/innodb_engine.so
/usr/lib64/mysql/plugin/libdaemon_example.so
/usr/lib64/mysql/plugin/libmemcached.so
/usr/lib64/mysql/plugin/mypluglib.so
/usr/lib64/mysql/plugin/qa_auth_client.so
/usr/lib64/mysql/plugin/qa_auth_interface.so
/usr/lib64/mysql/plugin/qa_auth_server.so
/usr/lib64/mysql/plugin/semisync_master.so
/usr/lib64/mysql/plugin/semisync_slave.so
/usr/lib64/mysql/plugin/validate_password.so
/usr/sbin/mysqld
/usr/sbin/mysqld-debug
/usr/share/doc/mysql-community-server-5.6.20/COPYING
/usr/share/doc/mysql-community-server-5.6.20/ChangeLog
/usr/share/doc/mysql-community-server-5.6.20/INFO_BIN
/usr/share/doc/mysql-community-server-5.6.20/INFO_SRC
/usr/share/doc/mysql-community-server-5.6.20/README
/usr/share/doc/mysql-community-server-5.6.20/my-default.cnf
/usr/share/man/man1/innochecksum.1.gz
/usr/share/man/man1/my_print_defaults.1.gz
/usr/share/man/man1/myisam_ftdump.1.gz
/usr/share/man/man1/myisamchk.1.gz
/usr/share/man/man1/myisamlog.1.gz
/usr/share/man/man1/myisampack.1.gz
/usr/share/man/man1/mysql.server.1.gz
/usr/share/man/man1/mysql_convert_table_format.1.gz
/usr/share/man/man1/mysql_fix_extensions.1.gz
/usr/share/man/man1/mysql_install_db.1.gz
/usr/share/man/man1/mysql_plugin.1.gz
/usr/share/man/man1/mysql_secure_installation.1.gz
/usr/share/man/man1/mysql_tzinfo_to_sql.1.gz
/usr/share/man/man1/mysql_upgrade.1.gz
/usr/share/man/man1/mysql_zap.1.gz
/usr/share/man/man1/mysqlbug.1.gz
/usr/share/man/man1/mysqld_multi.1.gz
/usr/share/man/man1/mysqld_safe.1.gz
/usr/share/man/man1/mysqldumpslow.1.gz
/usr/share/man/man1/mysqlhotcopy.1.gz
/usr/share/man/man1/mysqlman.1.gz
/usr/share/man/man1/mysqltest.1.gz
/usr/share/man/man1/perror.1.gz
/usr/share/man/man1/replace.1.gz
/usr/share/man/man1/resolve_stack_dump.1.gz
/usr/share/man/man1/resolveip.1.gz
/usr/share/man/man8/mysqld.8.gz
/usr/share/mysql/SELinux/RHEL4/mysql.fc
/usr/share/mysql/SELinux/RHEL4/mysql.te
/usr/share/mysql/dictionary.txt
/usr/share/mysql/fill_help_tables.sql
/usr/share/mysql/innodb_memcached_config.sql
/usr/share/mysql/magic
/usr/share/mysql/my-default.cnf
/usr/share/mysql/mysql-log-rotate
/usr/share/mysql/mysql_security_commands.sql
/usr/share/mysql/mysql_system_tables.sql
/usr/share/mysql/mysql_system_tables_data.sql
/usr/share/mysql/mysql_test_data_timezone.sql
/var/lib/mysql
/var/run/mysqld
5. 配制my.cnf
datadir mysql.sock error.log etc
6.测试
dtrace -l |c++filt
58746 mysql5011 mysqld ha_myisam::rnd_next(unsigned char*) read-row-start
58747 mysql5011 mysqld ha_tina::rnd_pos(unsigned char*, unsigned char*) read-row-start
58748 mysql5011 mysqld ha_tina::rnd_next(unsigned char*) read-row-start
58749 mysql5011 mysqld ha_blackhole::rnd_next(unsigned char*) read-row-start
58750 mysql5011 mysqld ha_blackhole::rnd_pos(unsigned char*, unsigned char*) read-row-start
58751 mysql5011 mysqld handle_select(THD*, select_result*, unsigned long) select-done
58752 mysql5011 mysqld handle_select(THD*, select_result*, unsigned long) select-start
58753 mysql5011 mysqld mysql_execute_command(THD*) update-done
58754 mysql5011 mysqld handler::ha_update_row(unsigned char const*, unsigned char*) update-row-done
58755 mysql5011 mysqld handler::ha_update_row(unsigned char const*, unsigned char*) update-row-start
58756 mysql5011 mysqld mysql_execute_command(THD*) update-start