 MySQL Installer Guideinteroperability, is prohibited. Warranty Disclaimer The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them release, but it excludes development-milestone versions. When you are not logged in, you see only the list of bundled products that you downloaded already. The Commercial release also includes the following detects existing MySQL products installed on the host during its initial setup and adds them to the list of products to be managed. Figure 2.1 MySQL Installer Process Overview MySQL Installer extracts0 码力 | 42 页 | 448.90 KB | 1 年前3 MySQL Installer Guideinteroperability, is prohibited. Warranty Disclaimer The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them release, but it excludes development-milestone versions. When you are not logged in, you see only the list of bundled products that you downloaded already. The Commercial release also includes the following detects existing MySQL products installed on the host during its initial setup and adds them to the list of products to be managed. Figure 2.1 MySQL Installer Process Overview MySQL Installer extracts0 码力 | 42 页 | 448.90 KB | 1 年前3
 使用 Docker 建立 MySQL 集群/*如果已经开启了同步,停止同步*/ stop slave; /*设定主数据库*/ change master to master_host='master_db', master_user='sync', master_password='sync', master_port=3306, master_log_file='<主数据库查询得到的 File 值>', master_log_pos=<主数据库查询得到的 Positions Positions 值>; 下面是我的脚本例子: change master to master_host='master_db', master_user='sync', master_password='sync', master_port=3306, master_log_file='mariadb-bin.000004', master_log_pos=789; /*开启从数据库复制*/ start slave;0 码力 | 3 页 | 103.32 KB | 1 年前3 使用 Docker 建立 MySQL 集群/*如果已经开启了同步,停止同步*/ stop slave; /*设定主数据库*/ change master to master_host='master_db', master_user='sync', master_password='sync', master_port=3306, master_log_file='<主数据库查询得到的 File 值>', master_log_pos=<主数据库查询得到的 Positions Positions 值>; 下面是我的脚本例子: change master to master_host='master_db', master_user='sync', master_password='sync', master_port=3306, master_log_file='mariadb-bin.000004', master_log_pos=789; /*开启从数据库复制*/ start slave;0 码力 | 3 页 | 103.32 KB | 1 年前3
 MySQL 数据库架构灾难恢复解决方案:使skip-slave-start 成为全局、持久、只读的系统变量。 8.0.26 :组复制成员操作(主成员上可配置super_read_only) 8.0.26:指定用于记录View_change_log_event 的UUID 8.0.27:异步复制通道配置自动跟随主成员 Copyright @ 2021 Oracle and/or its affiliates. MySQL InnoDB root@localhost:3331 --user=mysqlrouter $ sudo systemctl start mysqlrouter $ sudo tail -f /var/log/mysqlrouter/mysqlrouter.log 29 / 55 Copyright @ 2021 Oracle and/or its affiliates. 更改路由器配置选项 更改target_cluster:0 码力 | 52 页 | 3.07 MB | 1 年前3 MySQL 数据库架构灾难恢复解决方案:使skip-slave-start 成为全局、持久、只读的系统变量。 8.0.26 :组复制成员操作(主成员上可配置super_read_only) 8.0.26:指定用于记录View_change_log_event 的UUID 8.0.27:异步复制通道配置自动跟随主成员 Copyright @ 2021 Oracle and/or its affiliates. MySQL InnoDB root@localhost:3331 --user=mysqlrouter $ sudo systemctl start mysqlrouter $ sudo tail -f /var/log/mysqlrouter/mysqlrouter.log 29 / 55 Copyright @ 2021 Oracle and/or its affiliates. 更改路由器配置选项 更改target_cluster:0 码力 | 52 页 | 3.07 MB | 1 年前3
 Materialize MySQL Database engine in ClickHousefrom MySQL when execute query MySQL Database Engine • Mapping to MySQL database • Fetch table list from MySQL • Fetch table struct from MySQL • Fetch data from MySQL when execute query MaterializeMySQL Check MySQL status const String & check_query = "SHOW VARIABLES WHERE " "(Variable_name = 'log_bin' AND upper(Value) = 'ON') " "OR (Variable_name = 'binlog_format' AND upper(Value) = std::stringstream ss; client.getPosition().dump(ss); return ss.str(); }; LOG_INFO(log, "MySQL executed position: \n {}", position_message()); } Consume new data F.A.Q • MySQL0 码力 | 35 页 | 226.98 KB | 1 年前3 Materialize MySQL Database engine in ClickHousefrom MySQL when execute query MySQL Database Engine • Mapping to MySQL database • Fetch table list from MySQL • Fetch table struct from MySQL • Fetch data from MySQL when execute query MaterializeMySQL Check MySQL status const String & check_query = "SHOW VARIABLES WHERE " "(Variable_name = 'log_bin' AND upper(Value) = 'ON') " "OR (Variable_name = 'binlog_format' AND upper(Value) = std::stringstream ss; client.getPosition().dump(ss); return ss.str(); }; LOG_INFO(log, "MySQL executed position: \n {}", position_message()); } Consume new data F.A.Q • MySQL0 码力 | 35 页 | 226.98 KB | 1 年前3
 运维上海2017-从理论到实践,深度解析MySQL Group Replication -徐春阳���������sql)��! ��sql! mysql_parse! mysql_execute_comma nd! trans_commit_stmt! MYSQL_BIN_LOG::com mit! group_replication_trans_before_commit! waitTicket! ���������� ���������� ���������� ������paxos� ACTION_PACKET_TYPE:! this->incoming->pop();! ����������������������! case VIEW_CHANGE_PACKET_TYPE:! ������������������! case DATA_PACKET_TYPE:! packet_application_error=0 码力 | 32 页 | 9.55 MB | 1 年前3 运维上海2017-从理论到实践,深度解析MySQL Group Replication -徐春阳���������sql)��! ��sql! mysql_parse! mysql_execute_comma nd! trans_commit_stmt! MYSQL_BIN_LOG::com mit! group_replication_trans_before_commit! waitTicket! ���������� ���������� ���������� ������paxos� ACTION_PACKET_TYPE:! this->incoming->pop();! ����������������������! case VIEW_CHANGE_PACKET_TYPE:! ������������������! case DATA_PACKET_TYPE:! packet_application_error=0 码力 | 32 页 | 9.55 MB | 1 年前3
 Kubernetes Operator 实践 - MySQL容器化API Server Reflector DeltaFIFO Local Storage Callbacks OnAdd OnUpdate OnDelete WorkQueue List/Watch - CRD - Pod Write Informer Worker ReadOnly • Informer:监听事件并触发回调函数的二级缓存工具包 • WorkQueue:事件合并、过滤、延时、限速 Host Path Volumes • 优点:读写延迟低 • 缺点:单点数据,容器漂移时 数据丢失 踩到的坑 • 现象:执行 docker 命令时,docker daemon 无响应,/var/log/messages 大量报错 libceph: osdxx 10.0.0.0:6812 socket closed (con state OPEN) 原因:libceph 触发了 linux 内核 的一个0 码力 | 42 页 | 4.77 MB | 1 年前3 Kubernetes Operator 实践 - MySQL容器化API Server Reflector DeltaFIFO Local Storage Callbacks OnAdd OnUpdate OnDelete WorkQueue List/Watch - CRD - Pod Write Informer Worker ReadOnly • Informer:监听事件并触发回调函数的二级缓存工具包 • WorkQueue:事件合并、过滤、延时、限速 Host Path Volumes • 优点:读写延迟低 • 缺点:单点数据,容器漂移时 数据丢失 踩到的坑 • 现象:执行 docker 命令时,docker daemon 无响应,/var/log/messages 大量报错 libceph: osdxx 10.0.0.0:6812 socket closed (con state OPEN) 原因:libceph 触发了 linux 内核 的一个0 码力 | 42 页 | 4.77 MB | 1 年前3
 Analyzing MySQL Logs with ClickHousequery © 2018 Percona. 7 Clickhouse Answers • 10x+ times space reduction compared to Raw Text Log Files High Compression (column store + LZ4) • Typically 100x faster than MySQL on Single com/Altinity/clicktail Created by my friends at Altinity Replaced HoneyComb “Sender” with Clickhouse Added Audit Log Support Meet ClickTail © 2018 Percona. 14 Installing ClickTail • curl -s https://packagecloud To run as a service © 2018 Percona. 15 MySQL Logs Primer General Query Log Binary Log Slow Query Log Audit Log © 2018 Percona. 16 MySQL Audit Logs to ClickHouse © 2018 Percona. 17 When0 码力 | 43 页 | 2.70 MB | 1 年前3 Analyzing MySQL Logs with ClickHousequery © 2018 Percona. 7 Clickhouse Answers • 10x+ times space reduction compared to Raw Text Log Files High Compression (column store + LZ4) • Typically 100x faster than MySQL on Single com/Altinity/clicktail Created by my friends at Altinity Replaced HoneyComb “Sender” with Clickhouse Added Audit Log Support Meet ClickTail © 2018 Percona. 14 Installing ClickTail • curl -s https://packagecloud To run as a service © 2018 Percona. 15 MySQL Logs Primer General Query Log Binary Log Slow Query Log Audit Log © 2018 Percona. 16 MySQL Audit Logs to ClickHouse © 2018 Percona. 17 When0 码力 | 43 页 | 2.70 MB | 1 年前3
 Best Practices for MySQL with SSDsSeparate log_dir and datadir. All storage types benefit from this. For both Percona and MySQL Server, it means setting up the parameters from Appendix A marked with either or <log storage> tmpdir /tmp /<log storage>/mysql_log lc‐messages‐dir /usr/share/mysql explicit_defaults_for_timestamp innodb_log_group_home_dir /<log storage>/mysql_log Best Practices for innodb_undo_directory /<log storage>/mysql_log innodb_buffer_pool_size 3GB 12GB innodb_thread_concurrency 0 innodb_temp_data_file_path '../../../<log storage>/mysql_log/ibtmp1:72 M:autoextend'0 码力 | 14 页 | 416.88 KB | 1 年前3 Best Practices for MySQL with SSDsSeparate log_dir and datadir. All storage types benefit from this. For both Percona and MySQL Server, it means setting up the parameters from Appendix A marked with either or <log storage> tmpdir /tmp /<log storage>/mysql_log lc‐messages‐dir /usr/share/mysql explicit_defaults_for_timestamp innodb_log_group_home_dir /<log storage>/mysql_log Best Practices for innodb_undo_directory /<log storage>/mysql_log innodb_buffer_pool_size 3GB 12GB innodb_thread_concurrency 0 innodb_temp_data_file_path '../../../<log storage>/mysql_log/ibtmp1:72 M:autoextend'0 码力 | 14 页 | 416.88 KB | 1 年前3
 谈谈MYSQL那点事1024M innodb_flush_log_at_trx _commit 1 0 0 代表日志只大约每秒写入日志文件并且日志文件 刷新到磁盘 ; 1 为执行完没执行一条 SQL 马上 commit; 2 代表日志写入日志文件在每次提交 后 , 但是日志文件只有大约每秒才会刷新到磁盘上 . 对速度影响比较大,同时也关系数据完整性 innodb_log_file_size 8M 512M innodb_buffer_pool_size 的 25% ,官方推荐是 innodb_buffer_pool_size 的 40-50%, 设置大 一点来避免在日志文件覆写上不必要的缓冲池刷新 行为 innodb_log_buffer_size 128K 64M 用来缓冲日志数据的缓冲区的大小 . 推荐是 8M , 官方推荐该值小于 16M ,最好是 1M-8M 之间  设计合理的数据表结构:适当的数据冗余 设计合理的数据表结构:适当的数据冗余 执行情况,是否锁表,查看相应的 SQL SQL 语句 语句  设置 设置 my.cnf my.cnf 中的 中的 long-query-time long-query-time 和 和 log-slow-queries log-slow-queries 能 能 够 够 记录服务器那些 记录服务器那些 SQL SQL 执行速度比较慢 执行速度比较慢  另外有用的几个查询: 另外有用的几个查询:0 码力 | 38 页 | 2.04 MB | 1 年前3 谈谈MYSQL那点事1024M innodb_flush_log_at_trx _commit 1 0 0 代表日志只大约每秒写入日志文件并且日志文件 刷新到磁盘 ; 1 为执行完没执行一条 SQL 马上 commit; 2 代表日志写入日志文件在每次提交 后 , 但是日志文件只有大约每秒才会刷新到磁盘上 . 对速度影响比较大,同时也关系数据完整性 innodb_log_file_size 8M 512M innodb_buffer_pool_size 的 25% ,官方推荐是 innodb_buffer_pool_size 的 40-50%, 设置大 一点来避免在日志文件覆写上不必要的缓冲池刷新 行为 innodb_log_buffer_size 128K 64M 用来缓冲日志数据的缓冲区的大小 . 推荐是 8M , 官方推荐该值小于 16M ,最好是 1M-8M 之间  设计合理的数据表结构:适当的数据冗余 设计合理的数据表结构:适当的数据冗余 执行情况,是否锁表,查看相应的 SQL SQL 语句 语句  设置 设置 my.cnf my.cnf 中的 中的 long-query-time long-query-time 和 和 log-slow-queries log-slow-queries 能 能 够 够 记录服务器那些 记录服务器那些 SQL SQL 执行速度比较慢 执行速度比较慢  另外有用的几个查询: 另外有用的几个查询:0 码力 | 38 页 | 2.04 MB | 1 年前3
 MySQL高可用 - 多种方案d/authkeys auth 1 1 crc  ha.cf 的配置 master 的 ha.cf 的配置 vim /etc/ha.d/ha.cf logfile /var/log/ha-log logfacility local0 keepalive 2 deadtime 30 warntime 10 initdead 60 udpport 694 ucast hacluster /usr/lib64/heartbeat/ipfail backup 的 ha.cf 的配置 vim /etc/ha.d/ha.cf logfile /var/log/ha-log logfacility local0 keepalive 2 deadtime 30 warntime 10 initdead 60 udpport 694 ucast auth 1 1 crc  ha.cf 的配置 master(dbserver1)的 ha.cf 的配置 vim /etc/ha.d/ha.cf logfile /var/log/ha-log logfacility local0 keepalive 2 deadtime 30 warntime 10 initdead 60 udpport 694 ucast0 码力 | 31 页 | 874.28 KB | 1 年前3 MySQL高可用 - 多种方案d/authkeys auth 1 1 crc  ha.cf 的配置 master 的 ha.cf 的配置 vim /etc/ha.d/ha.cf logfile /var/log/ha-log logfacility local0 keepalive 2 deadtime 30 warntime 10 initdead 60 udpport 694 ucast hacluster /usr/lib64/heartbeat/ipfail backup 的 ha.cf 的配置 vim /etc/ha.d/ha.cf logfile /var/log/ha-log logfacility local0 keepalive 2 deadtime 30 warntime 10 initdead 60 udpport 694 ucast auth 1 1 crc  ha.cf 的配置 master(dbserver1)的 ha.cf 的配置 vim /etc/ha.d/ha.cf logfile /var/log/ha-log logfacility local0 keepalive 2 deadtime 30 warntime 10 initdead 60 udpport 694 ucast0 码力 | 31 页 | 874.28 KB | 1 年前3
共 13 条
- 1
- 2













