{"id":2175,"date":"2025-07-08T12:21:28","date_gmt":"2025-07-08T04:21:28","guid":{"rendered":"http:\/\/113.45.254.23\/?p=2175"},"modified":"2025-07-08T12:21:29","modified_gmt":"2025-07-08T04:21:29","slug":"%e7%9b%91%e6%8e%a7mariadb%e6%95%b0%e6%8d%ae%e5%ba%93","status":"publish","type":"post","link":"http:\/\/113.45.254.23\/?p=2175","title":{"rendered":"\u76d1\u63a7mariadb\u6570\u636e\u5e93"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u4e00\u3001\u5b9e\u9a8c\u73af\u5883\uff1a<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>\u90e8\u7f72\u5728\u865a\u62df\u673a\u6216\u7269\u7406\u670d\u52a1\u5668\u4e0a\uff0c\u4e0d\u80fd\u90e8\u7f72\u5728docker\u4e0a\uff0c\u6240\u6709\u8981\u8fd8\u539f\u81f3\u65b0\u7cfb\u7edf\uff0c\u6ce8\u610f\u4e0d\u662fK8s\u65b0\u7cfb\u7edf\uff1b<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/07\/image-45-1024x405.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"405\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/07\/image-45-1024x405.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-2176\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/07\/image-46-1024x413.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"413\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/07\/image-46-1024x413.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-2177\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u3001\u4fee\u6539180\u3001181\u673a\u5668\u7684\u540d\u79f0\uff1adb1\\db2\uff1b\u505a\u65f6\u95f4\u540c\u6b65\uff0c\u90fd\u4e3a\u963f\u91cc\u4e91\u65f6\u95f4<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/07\/image-47.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"692\" height=\"546\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/07\/image-47.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-2178\"  sizes=\"auto, (max-width: 692px) 100vw, 692px\" \/><\/div><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@Server10 ~]#\n&#91;root@Server10 ~]# hostnamectl set-hostname db1\n&#91;root@Server10 ~]# exit\n\u6ce8\u9500\n\n&#91;root@Server11 ~]#\n&#91;root@Server11 ~]# hostnamectl set-hostname db2\n&#91;root@Server11 ~]# exit\n\u6ce8\u9500<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@db1 ~]# vim \/etc\/chrony.conf\n#pool 2.rocky.pool.ntp.org iburst\npool ntp.aliyun.com iburst<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@db1 ~]# systemctl restart chronyd\n\n&#91;root@db1 ~]# chronyc sources -v\n\n  .-- Source mode  '^' = server, '=' = peer, '#' = local clock.\n \/ .- Source state '*' = current best, '+' = combined, '-' = not combined,\n| \/             'x' = may be in error, '~' = too variable, '?' = unusable.\n||                                                 .- xxxx &#91; yyyy ] +\/- zzzz\n||      Reachability register (octal) -.           |  xxxx = adjusted offset,\n||      Log2(Polling interval) --.      |          |  yyyy = measured offset,\n||                                \\     |          |  zzzz = estimated error.\n||                                 |    |           \\\nMS Name\/IP address         Stratum Poll Reach LastRx Last sample\n===============================================================================\n^? 203.107.6.88                  2   6     3     2  -7754us&#91;-7754us] +\/-   20ms<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@db2 ~]# vim \/etc\/chrony.conf\n#pool 2.rocky.pool.ntp.org iburst\npool ntp.aliyun.com iburst<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@db2 ~]# systemctl restart chronyd\n\n&#91;root@db2 ~]# chronyc sources -v\n\n  .-- Source mode  '^' = server, '=' = peer, '#' = local clock.\n \/ .- Source state '*' = current best, '+' = combined, '-' = not combined,\n| \/             'x' = may be in error, '~' = too variable, '?' = unusable.\n||                                                 .- xxxx &#91; yyyy ] +\/- zzzz\n||      Reachability register (octal) -.           |  xxxx = adjusted offset,\n||      Log2(Polling interval) --.      |          |  yyyy = measured offset,\n||                                \\     |          |  zzzz = estimated error.\n||                                 |    |           \\\nMS Name\/IP address         Stratum Poll Reach LastRx Last sample\n===============================================================================\n^? 203.107.6.88                  2   6     3     2  -7754us&#91;-7754us] +\/-   20ms<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@db1 ~]# date\n2025\u5e74 07\u6708 02\u65e5 \u661f\u671f\u4e09 17:20:43 CST\n&#91;root@db1 ~]# clock -w\n&#91;root@db1 ~]#<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u3001\u5b89\u88c5mariadb\u6570\u636e\u5e93<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@db1 ~]# dnf -y install mariadb-server mariadb <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@db1 ~]# systemctl enable --now mariadb\nCreated symlink \/etc\/systemd\/system\/mysql.service                             \u2192 \/usr\/lib\/systemd\/system\/mariadb.service.\nCreated symlink \/etc\/systemd\/system\/mysqld.service                             \u2192 \/usr\/lib\/systemd\/system\/mariadb.service.\nCreated symlink \/etc\/systemd\/system\/multi-user.tar                            get.wants\/mariadb.service \u2192 \/usr\/lib\/systemd\/syste                            m\/mariadb.service.<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u56db\u3001MySQL \u6570\u636e\u5e93\u5b89\u5168\u914d\u7f6e<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@db1 ~]# mysql_secure_installation\n\nNOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMEN                            DED FOR ALL MariaDB\n      SERVERS IN PRODUCTION USE!  PLEASE READ EACH                             STEP CAREFULLY!\n\nIn order to log into MariaDB to secure it, we'll n                            eed the current\npassword for the root user. If you've just install                            ed MariaDB, and\nhaven't set the root password yet, you should just                             press enter here.\n\nEnter current password for root (enter for none):\nOK, successfully used password, moving on...\n\nSetting the root password or using the unix_socket                             ensures that nobody\ncan log into the MariaDB root user without the pro                            per authorisation.\n\nYou already have your root account protected, so y                            ou can safely answer 'n'.\n\nSwitch to unix_socket authentication &#91;Y\/n] n\n ... skipping.\n\nYou already have your root account protected, so you can safely answer 'n'.\n\nChange the root password? &#91;Y\/n] y\nNew password: 123.com\nRe-enter new password:\nPassword updated successfully!\nReloading privilege tables..\n ... Success!\nBy default, a MariaDB installation has an anonymous user, allowing anyone\nto log into MariaDB without having to have a user account created for\nthem.  This is intended only for testing, and to make the installation\ngo a bit smoother.  You should remove them before moving into a\nproduction environment.\n\nRemove anonymous users? &#91;Y\/n] y\n ... Success!\n\nNormally, root should only be allowed to connect from 'localhost'.  This\nensures that someone cannot guess at the root password from the network.\n\nDisallow root login remotely? &#91;Y\/n] y\n ... Success!\n\nBy default, MariaDB comes with a database named 'test' that anyone can\naccess.  This is also intended only for testing, and should be removed\nbefore moving into a production environment.\n\nRemove test database and access to it? &#91;Y\/n] y\n - Dropping test database...\n ... Success!\n - Removing privileges on test database...\n ... Success!\n\nReloading the privilege tables will ensure that all changes made so far\nwill take effect immediately.\n\nReload privilege tables now? &#91;Y\/n] y\n ... Success!\n\nCleaning up...\n\nAll done!  If you've completed all of the above steps, your MariaDB\ninstallation should now be secure.\n\nThanks for using MariaDB!\n&#91;root@db1 ~]#<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e94\u3001\u7f16\u8f91mariadb\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u4e3b\u914d\u7f6e\u6587\u4ef6<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@db1 ~]# vim \/etc\/my.cnf.d\/mariadb-server.cnf\t\t\u7f16\u8f91mariadb\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u4e3b\u914d\u7f6e\u6587\u4ef6\nserver-id=1\nlog-bin=mysql-bin<\/code><\/pre>\n\n\n\n<p>[root@db1 ~]# systemctl restart mariadb<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u516d\u3001\u8fdb\u5165\u6570\u636e\u5e93\u5185<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@db1 ~]# mysql\nWelcome to the MariaDB monitor.  Commands end with ; or \\g.\nYour MariaDB connection id is 4\nServer version: 10.5.27-MariaDB-log MariaDB Server\n\nCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n\nMariaDB &#91;(none)]> STOP SLAVE;\nQuery OK, 0 rows affected, 1 warning (0.000 sec)\n\nMariaDB &#91;(none)]> GRANT REPLICATION SLAVE ON *.* TO 'sk'@'%' IDENTIFIED BY 'redhat';\nQuery OK, 0 rows affected (0.001 sec)\n\nMariaDB &#91;(none)]> FLUSH PRIVILEGES;\nQuery OK, 0 rows affected (0.001 sec)\n\nMariaDB &#91;(none)]> SHOW MASTER STATUS;\t\u3010\u67e5\u770b\u4e3b\u6570\u636e\u5e93\u7684\u72b6\u6001\u3011\n+------------------+----------+--------------+------------------+\n| File             | Position | Binlog_Do_DB | Binlog_Ignore_DB |\n+------------------+----------+--------------+------------------+\n| mysql-bin.000001 |      635 |              |                  |\n+------------------+----------+--------------+------------------+\n1 row in set (0.000 sec)\n\nMariaDB &#91;(none)]>\nMariaDB &#91;(none)]> unlock tables;   #\u8fd9\u91ccdb1\u662f\u4e3b\u6570\u636e\u5e93\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u9700\u8981\u89e3\u9501\u8868\uff1bdb2\u662f\u4ece\u6570\u636e\u5e93\uff0c\u4e0d\u9700\u8981\u89e3\u9501\nQuery OK, 0 rows affected (0.000 sec)\n\nMariaDB &#91;(none)]> exit\nBye\n&#91;root@db1 ~]# init 0   (\u4e0b\u8bfe\u4e86\uff0c\u5173\u673a)\n&#91;root@db1 ~]#\n\n&#91;root@db2 ~]# init 0    (\u4e0b\u8bfe\u4e86\uff0c\u5173\u673a)\n&#91;root@db2 ~]#<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/07\/image-48.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"692\" height=\"489\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/07\/image-48.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-2179\"  sizes=\"auto, (max-width: 692px) 100vw, 692px\" \/><\/div><\/figure>\n\n\n\n<p>Db2\u4ece\u6570\u636e\u5e93\u672a\u914d\u7f6e<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e03\u3001\u5b9e\u9a8c\u73af\u5883\uff1a<\/h2>\n\n\n\n<p>\u5feb\u7167\uff1adb1\u4e3b\u6570\u636e\u5e93\u914d\u7f6e\u5b8c\u6210\uff1bdb2\u76f4\u63a5\u5f00\u673a<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u516b\u3001db2\u7f16\u8f91mariadb\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u4e3b\u914d\u7f6e\u6587\u4ef6<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@db2 ~]# vim \/etc\/my.cnf.d\/mariadb-server.cnf \t\t\u7f16\u8f91mariadb\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u4e3b\u914d\u7f6e\u6587\u4ef6\nserver-id=2\nlog-bin=mysql-bin<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@db2 ~]# systemctl restart mariadb<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e5d\u3001\u8fdb\u5165\u6570\u636e\u5e93\u5185<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@db2 ~]# mysql\nWelcome to the MariaDB monitor.  Commands end with ; or \\g.\nYour MariaDB connection id is 4\nServer version: 10.5.27-MariaDB-log MariaDB Server\n\nCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n\nMariaDB &#91;(none)]> stop slave;\nQuery OK, 0 rows affected, 1 warning (0.000 sec)\n\nMariaDB &#91;(none)]> change master to\n    -> master_host='192.168.7.10',\n    -> master_user='sk',\n    -> master_password='redhat',\n    -> master_log_file='mysql-bin.000001',\n    -> master_log_pos=635;\nQuery OK, 0 rows affected (0.005 sec)\n\nMariaDB &#91;(none)]> start slave;\nQuery OK, 0 rows affected (0.001 sec)\nMariaDB &#91;(none)]> show slave status\\G;\t\t\u3010\u67e5\u770b\u4ece\u6570\u636e\u5e93\u7684\u72b6\u6001\u3011\n*************************** 1. row ***************************\n                Slave_IO_State: Waiting for master to send event\n                   Master_Host: 192.168.7.10\n                   Master_User: sk\n                   Master_Port: 3306\n                 Connect_Retry: 60\n               Master_Log_File: mysql-bin.000002\n           Read_Master_Log_Pos: 342\n                Relay_Log_File: mariadb-relay-bin.000003\n                 Relay_Log_Pos: 641\n         Relay_Master_Log_File: mysql-bin.000002\n              Slave_IO_Running: Yes\t\u3010\u4e3b\u8981\u67e5\u770b\u3011\n             Slave_SQL_Running: Yes\t\u3010\u4e3b\u8981\u67e5\u770b\u3011\n               Replicate_Do_DB:\n\nMariaDB &#91;(none)]> quit\nBye<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5341\u3001db1\\db2\u521b\u5efaPrometheus\u7cfb\u7edf\u7ec4\u53ca\u7528\u6237<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@db1 ~]# groupadd --system prometheus\t\u3010db1\/2\u521b\u5efaprometheus\u7cfb\u7edf\u7ec4\u3011\n&#91;root@db1 ~]# useradd -s \/sbin\/nologin --system -g prometheus prometheus\t\u3010db1\/2\u521b\u5efaprometheus\u7cfb\u7edf\u7528\u6237\u52a0\u5165\u5230prometheus\u7ec4\u91cc\uff0c\u4e0d\u5141\u8bb8\u672c\u5730\u767b\u5f55\u3011\n&#91;root@db1 ~]#\n&#91;root@db2 ~]# groupadd --system prometheus\n&#91;root@db2 ~]# useradd -s \/sbin\/nologin --system -g prometheus prometheus\n&#91;root@db2 ~]#<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5341\u4e00\u3001db1\u3001db2\u90fd\u4e0a\u4f20\u53ca\u89e3\u538btar\u5305\u89e3\u538b\u6570\u636e\u5e93\u7684\u63d2\u4ef6<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/07\/image-49.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"693\" height=\"672\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/07\/image-49.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-2180\"  sizes=\"auto, (max-width: 693px) 100vw, 693px\" \/><\/div><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@db1 ~]# ls\nanaconda-ks.cfg\nmysqld_exporter-0.14.0.linux-amd64.tar.gz\n&#91;root@db1 ~]# tar zxf mysqld_exporter-0.14.0.linux-amd64.tar.gz\t\t\u3010db1\/2\u90fdtar\u5305\u89e3\u538b\u6570\u636e\u5e93\u7684\u63d2\u4ef6\u3011\n&#91;root@db1 ~]# mv mysqld_exporter-0.14.0.linux-amd64\/mysqld_exporter \/usr\/local\/bin\/<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5341\u4e8c\u3001db1 \\db2\u5c06\u6570\u636e\u5e93\u63d2\u4ef6\u7684\u547d\u4ee4\u6dfb\u52a0\u6267\u884c\u6743\u9650<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@db1 \\db2~]# chmod +x \/usr\/local\/bin\/mysqld_exporter\t\u3010\u5c06\u6570\u636e\u5e93\u63d2\u4ef6\u7684\u547d\u4ee4\u6dfb\u52a0\u6267\u884c\u6743\u9650\u3011\n&#91;root@db1 \\db2~]#<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5341\u4e09\u3001db1\u767b\u5f55\u6570\u636e\u5e93<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@db1 ~]# mysql\t\t\u3010\u767b\u5f55\u6570\u636e\u5e93\u3011\nWelcome to the MariaDB monitor.  Commands end with ; or \\g.\nYour MariaDB connection id is 5\nServer version: 10.5.27-MariaDB-log MariaDB Server\n\nCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input stateme                                        nt.\n\n\nMariaDB &#91;(none)]> CREATE USER 'mysqld_exporter'@'localhost' IDENTIFIED BY 'Admin@123' WITH MAX_USER_CONNECTIONS 2;         \u3010\u521b\u5efamysqld_exporter\u7528\u6237\uff0c\u53ea\u5141\u8bb8\u672c\u5730\u767b\u5f55\uff0c\u6388\u6743\u8ba4\u8bc1\u5bc6\u7801\u4e3a\uff1aAdmin@123\uff0c\u6700\u5927\u8fde\u63a5\u7528\u6237\u4e3a2\u4e2a\u3011\uff08\u4e3a\u4ec0\u4e48\u6700\u5927\u8fde\u63a5\u7528\u6237\u662f2\u4e2a\uff1a\u56e0\u4e3a\u662f\u4e3b\u4ece\u590d\u5236\uff0c\u82e5\u60f3\u8981\u4e00\u4e3b\u4e8c\u4ece\u5c31\u8981\u4e3a3\u4e2a\uff09\nQuery OK, 0 rows affected (0.002 sec)\n\nMariaDB &#91;(none)]>  GRANT PROCESS,REPLICATION CLIENT,SELECT ON *.* TO 'mysqld_exporter'@'localhost';  \t\t\u3010\u5c06\u6570\u636e\u5e93\u7684\u6240\u6709\u5185\u5bb9\u3001\u6388\u6743\u8fdb\u7a0b\u3001\u590d\u5236\u5ba2\u6237\u7aef\u548c\u67e5\u8be2\uff0c\u7ed9mysqld_exporter\u7528\u6237\uff0c\u53ea\u5141\u8bb8\u672c\u5730\u767b\u5f55\u3011\nQuery OK, 0 rows affected (0.001 sec)\n\nMariaDB &#91;(none)]> FLUSH PRIVILEGES;\t\u3010\u5237\u65b0\u6388\u6743\u3011\nQuery OK, 0 rows affected (0.001 sec)\nQuery OK, 0 rows affected (0.000 sec)\n\nMariaDB &#91;(none)]> quit\nBye\n&#91;root@db1 ~]#<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5341\u56db\u3001db1\\db2\u6570\u636e\u5e93\u4e0b\u521b\u5efa\u9690\u85cf\u7684\u6570\u636e\u5e93\u63d2\u4ef6\u7684\u914d\u7f6e\u6587\u4ef6<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@db1 \\db2~]# vim \/etc\/.mysqld_exporter.cnf\t\u3010\u521b\u5efa\u9690\u85cf\u7684\u6570\u636e\u5e93\u63d2\u4ef6\u7684\u914d\u7f6e\u6587\u4ef6\u3011\n&#91;client]\t\t\u3010\u5b9a\u4e49\u5ba2\u6237\u7aef\u3011\nuser=mysqld_exporter\t\t\u3010\u7528\u6237\u4e3a\uff1amysqld_exporter\u3011\npassword=Admin@123\t\t\u3010\u5bc6\u7801\u4e3a\uff1aAdmin@123\u3011<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@db1 \\db2~]# chown root:prometheus \/etc\/.mysqld_exporter.cnf\t\u3010\u5c06\u9690\u85cf\u6570\u636e\u5e93\u63d2\u63a5\u4ef6\u7684\u914d\u7f6e\u6587\u4ef6\u7528\u6237\u6539\u4e3aroot\uff0c\u7ec4\u6539\u4e3aprometheus\u3011\n&#91;root@db1 \\db2~]# vim \/etc\/systemd\/system\/mysqld_exporter.service\t\u3010\u521b\u5efa\u6570\u636e\u5e93\u63d2\u4ef6\u670d\u52a1\u7684\u6587\u4ef6\u3011\uff08\u4e3b\u8981\u7528\u6765\u542f\u52a8\u63d2\u4ef6\uff09\n&#91;Unit]\t\t\nDescription=Prometheus MySQL Exporter\nAfter=network.target\nUser=prometheus\nGroup=prometheus\n\n&#91;Service]\nType=simple\nRestart=always\nExecStart=\/usr\/local\/bin\/mysqld_exporter \\\n--config.my-cnf \/etc\/.mysqld_exporter.cnf \\\n--collect.global_status \\\n--collect.info_schema.innodb_metrics \\\n--collect.auto_increment.columns \\\n--collect.info_schema.processlist \\\n--collect.binlog_size \\\n--collect.info_schema.tablestats \\\n--collect.global_variables \\\n--collect.info_schema.query_response_time \\\n--collect.info_schema.userstats \\\n--collect.info_schema.tables \\\n--collect.perf_schema.tablelocks \\\n--collect.perf_schema.file_events \\\n--collect.perf_schema.eventswaits \\\n--collect.perf_schema.indexiowaits \\\n--collect.perf_schema.tableiowaits \\\n--collect.slave_status \\\n--web.listen-address=0.0.0.0:9104\n\n&#91;Install]\nWantedBy=multi-user.target\n&#91;root@db1 \\db2~]#<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@db1 ~]# systemctl daemon-reload\t\u3010\u91cd\u65b0\u52a0\u8f7d\u7cfb\u7edf\u8fdb\u7a0b\u3011\n&#91;root@db1 ~]# systemctl enable mysqld_exporter.service\t\u3010\u8bbe\u7f6e\u6570\u636e\u5e93\u63d2\u4ef6\u5f00\u673a\u542f\u52a8\u3011\nCreated symlink \/etc\/systemd\/system\/mul                     ti-user.target.wants\/mysqld_exporter.service \u2192 \/etc\/systemd\/system\/mysqld_exporter.service.\n&#91;root@db1 ~]# systemctl start mysqld_exporter.service\t\t\u3010\u542f\u52a8\u6570\u636e\u5e93\u63d2\u4ef6\u3011\n&#91;root@db1 ~]# systemctl status mysqld_exporter.service\t\t\u3010\u67e5\u770b\u6570\u636e\u5e93\u63d2\u4ef6\u7684\u72b6\u6001\u3011\n\u25cf mysqld_exporter.service - Prometheus>\n     Loaded: loaded (\/etc\/systemd\/syst>\n     Active: active (running) since Th>\n   Main PID: 6051 (mysqld_exporter)\n      Tasks: 4 (limit: 22936)\n     Memory: 2.6M\n        CPU: 3ms\n     CGroup: \/system.slice\/mysqld_expo>\n             \u2514\u25006051 \/usr\/local\/bin\/mys>\n\n7\u6708 03 15:11:35 db1 mysqld_exporter&#91;60>\n7\u6708 03 15:11:35 db1 mysqld_exporter&#91;60>\n7\u6708 03 15:11:35 db1 mysqld_exporter&#91;60>\n7\u6708 03 15:11:35 db1 mysqld_exporter&#91;60>\n7\u6708 03 15:11:35 db1 mysqld_exporter&#91;60>\n7\u6708 03 15:11:35 db1 mysqld_exporter&#91;60>\n7\u6708 03 15:11:35 db1 mysqld_exporter&#91;60>\n7\u6708 03 15:11:35 db1 mysqld_exporter&#91;60>\n7\u6708 03 15:11:35 db1 mysqld_exporter&#91;60>\n7\u6708 03 15:11:35 db1 mysqld_exporter&#91;60>\nlines 1-20\/20 (END)\n&#91;root@db1 ~]#<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5341\u4e94\u3001\u5f00\u542fMaster1\\node1\\node2\u865a\u62df\u673a\uff0c\u5e76\u8fd8\u539f\u81f3Prometheus\u548cgrafana\u914d\u7f6e\u5b8c\u6210<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u5f00\u542f\u540e\u7b2c\u4e00\u6b65\uff1a\u4e09\u53f0\u673a\u5668\u505a\u65f6\u95f4\u540c\u6b65\uff0c\u90fd\u540c\u6b65\u81f3aliyun\u65f6\u95f4\uff1a<\/h3>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/07\/image-50.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"691\" height=\"272\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/07\/image-50.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-2181\"  sizes=\"auto, (max-width: 691px) 100vw, 691px\" \/><\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u5341\u516d\u3001\u8fdb\u5165prometheus\u7684\u76ee\u5f55\u4e0b\uff0c\u7f16\u8f91prometheus-cfg\u7684\u539f\u914d\u7f6e\u6587\u4ef6<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@master1 ~]# ls\nanaconda-ks.cfg  kubeadm.yaml                            node-export.yaml\ncalico.tar.gz    kube-state-metrics-rbac.yaml            prometheus-cfg.yaml\t\u770b\u8fd9\u4e2a\ncalico.yaml      node_exporter-1.5.0.linux-amd64.tar.gz  prometheus-deploy.yaml\ngrafana.yaml     node-exporter.tar.gz                    prometheus-k8s\n&#91;root@master1 ~]# cd prometheus-k8s\/\t\t\u3010\u8fdb\u5165prometheus\u7684\u76ee\u5f55\u3011\n&#91;root@master1 prometheus-k8s]# ls\ngrafana.yaml                    kube-state-metrics-rbac.yaml  node-export.yaml     prometheus-deploy.yaml\nkube-state-metrics-deploy.yaml  kube-state-metrics-svc.yaml   prometheus-cfg.yaml  prometheus-svc.yaml\n&#91;root@master1 prometheus-k8s]# vim prometheus-cfg.yaml\t\u3010\u7f16\u8f91prometheus-cfg\u7684\u539f\u914d\u7f6e\u6587\u4ef6\u3011\n---\nkind: ConfigMap\napiVersion: v1\nmetadata:\n  labels:\n    app: prometheus\n  name: prometheus-config\n  namespace: monitor-sa\ndata:\n  prometheus.yml: |\n    global:\n      scrape_interval: 15s\n      scrape_timeout: 10s\n      evaluation_interval: 1m\n    scrape_configs:\n    - job_name: 'kubernetes-node'\n      kubernetes_sd_configs:\n      - role: node\n      relabel_configs:\n      - source_labels: &#91;__address__]\n        regex: '(.*):10250'\n        replacement: '${1}:9100'\n        target_label: __address__\n        action: replace\n      - action: labelmap\n        regex: __meta_kubernetes_node_label_(.+)\n    - job_name: 'kubernetes-node-cadvisor'\n      kubernetes_sd_configs:\n      - role:  node\n      scheme: https\n      tls_config:\n        ca_file: \/var\/run\/secrets\/kubernetes.io\/serviceaccount\/ca.crt\n      bearer_token_file: \/var\/run\/secrets\/kubernetes.io\/serviceaccount\/token\n      relabel_configs:\n      - action: labelmap\n        regex: __meta_kubernetes_node_label_(.+)\n      - target_label: __address__\n        replacement: kubernetes.default.svc:443\n      - source_labels: &#91;__meta_kubernetes_node_name]\n        regex: (.+)\n        target_label: __metrics_path__\n        replacement: \/api\/v1\/nodes\/${1}\/proxy\/metrics\/cadvisor\n    - job_name: 'kubernetes-apiserver'\n      kubernetes_sd_configs:\n      - role: endpoints\n      scheme: https\n      tls_config:\n        ca_file: \/var\/run\/secrets\/kubernetes.io\/serviceaccount\/ca.crt\n      bearer_token_file: \/var\/run\/secrets\/kubernetes.io\/serviceaccount\/token\n      relabel_configs:\n      - source_labels: &#91;__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name]\n        action: keep\n        regex: default;kubernetes;https\n    - job_name: 'kubernetes-service-endpoints'\n      kubernetes_sd_configs:\n      - role: endpoints\n      relabel_configs:\n      - source_labels: &#91;__meta_kubernetes_service_annotation_prometheus_io_scrape]\n        action: keep\n        regex: true\n      - source_labels: &#91;__meta_kubernetes_service_annotation_prometheus_io_scheme]\n        action: replace\n        target_label: __scheme__\n        regex: (https?)\n      - source_labels: &#91;__meta_kubernetes_service_annotation_prometheus_io_path]\n        action: replace\n        target_label: __metrics_path__\n        regex: (.+)\n      - source_labels: &#91;__address__, __meta_kubernetes_service_annotation_prometheus_io_port]\n        action: replace\n        target_label: __address__\n        regex: (&#91;^:]+)(?::\\d+)?;(\\d+)\n        replacement: $1:$2\n      - action: labelmap\n        regex: __meta_kubernetes_service_label_(.+)\n      - source_labels: &#91;__meta_kubernetes_namespace]\n        action: replace\n        target_label: kubernetes_namespace\n      - source_labels: &#91;__meta_kubernetes_service_name]\n        action: replace\n        target_label: kubernetes_name \n    - job_name: 'kubernetes-pods'\n      kubernetes_sd_configs:\n      - role: pod\n      relabel_configs:\n      - action: keep\n        regex: true\n        source_labels:\n        - __meta_kubernetes_pod_annotation_prometheus_io_scrape\n      - action: replace\n        regex: (.+)\n        source_labels:\n        - __meta_kubernetes_pod_annotation_prometheus_io_path\n        target_label: __metrics_path__\n      - action: replace\n        regex: (&#91;^:]+)(?::\\d+)?;(\\d+)\n        replacement: $1:$2\n        source_labels:\n        - __address__\n        - __meta_kubernetes_pod_annotation_prometheus_io_port\n        target_label: __address__\n      - action: labelmap\n        regex: __meta_kubernetes_pod_label_(.+)\n      - action: replace\n        source_labels:\n        - __meta_kubernetes_namespace\n        target_label: kubernetes_namespace\n      - action: replace\n        source_labels:\n        - __meta_kubernetes_pod_name\n        target_label: kubernetes_pod_name\n    - job_name: 'db1'\t\t\u3010\u5b9a\u4e49\u5de5\u4f5c\u4efb\u52a1\uff1adb1\u3011\n      static_configs:\t\t\u3010\u9759\u6001\u914d\u7f6e\u3011\n        - targets: &#91;'192.168.7.10:9104']\t\u3010\u76ee\u6807\u4e3a\uff1a192.168.7.10\u7aef\u53e3\u53f7\u4e3a\uff1a9104\uff08\u6570\u636e\u5e93\u63d2\u4ef6\u7684\u7aef\u53e3\u53f7\uff09\u3011\n    - job_name: 'db2'\t\t\u3010\u5b9a\u4e49\u5de5\u4f5c\u4efb\u52a1\uff1adb2\u3011\n      static_configs:\t\t\n        - targets: &#91;'192.168.7.11:9104']\t\u3010\u76ee\u6807\u4e3a\uff1a192.168.7.11\u7aef\u53e3\u53f7\u4e3a\uff1a9104\uff08\u6570\u636e\u5e93\u63d2\u4ef6\u7684\u7aef\u53e3\u53f7\uff09\u3011<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@master1 prometheus-k8s]#\n&#91;root@master1 prometheus-k8s]# kubectl apply -f prometheus-cfg.yaml\t\t\u3010\u5e94\u7528prometheus-cfg\u7684\u539f\u914d\u7f6e\u6587\u4ef6\u3011\nconfigmap\/prometheus-config configured\n&#91;root@master1 prometheus-k8s]# kubectl delete -f prometheus-deploy.yaml\t\u3010\u5220\u9664\u65e0\u72b6\u6001\u5e94\u7528\u914d\u7f6e\u6587\u4ef6\u3011\ndeployment.apps \"prometheus-server\" deleted\n&#91;root@master1 prometheus-k8s]# kubectl apply -f prometheus-deploy.yaml\t\u3010\u5e94\u7528\u65e0\u72b6\u6001\u5e94\u7528\u914d\u7f6e\u6587\u4ef6\u3011\n\uff08\u4e3a\u4ec0\u4e48\u8981\u5220\u9664\u518d\u5e94\u7528\uff1a\u56e0\u4e3a\u66f4\u6539\u4e86\u539f\u914d\u7f6e\u6587\u4ef6\u6240\u6709\u8981\u5220\u9664\u5e94\u7528\u518d\u91cd\u65b0\u5e94\u7528\uff09\ndeployment.apps\/prometheus-server created\n&#91;root@master1 prometheus-k8s]#\n&#91;root@master1 prometheus-k8s]# kubectl get svc -n kube-system | grep grafana\u3010\u67e5\u770bgrafana\u7684\u670d\u52a1\u3011\nmonitoring-grafana   NodePort    10.111.7.156   &lt;none>        80:32668\/TCP             47h\u3010\u4e3b\u8981\u67e5\u770b\u7aef\u53e3\u53f7\u3011\n&#91;root@master1 prometheus-k8s]# <\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5341\u4e03\u3001\u7f51\u9875\u4e0a\u767b\u5f55\uff1a192.168.7.180\uff1a32668\uff0c\u4e0a\u4f20json\u6587\u4ef6<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/07\/image-52.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"692\" height=\"651\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/07\/image-52.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-2183\"  sizes=\"auto, (max-width: 692px) 100vw, 692px\" \/><\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u5341\u516b\u3001\u6d4b\u8bd5\u642d\u5efa\u7684Prometheus\u76d1\u63a7\u6570\u636e\u5e93\u662f\u5426\u6210\u529f\uff1a<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/07\/image-53-1024x633.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"633\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/07\/image-53-1024x633.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-2184\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/07\/image-54-1024x938.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"938\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/07\/image-54-1024x938.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-2185\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/07\/image-55-1024x479.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"479\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/07\/image-55-1024x479.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-2186\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u5b9e\u9a8c\u73af\u5883\uff1a \u4e8c\u3001\u4fee\u6539180\u3001181\u673a\u5668\u7684\u540d\u79f0\uff1adb1\\db2\uff1b\u505a\u65f6\u95f4\u540c\u6b65\uff0c\u90fd\u4e3a\u963f\u91cc\u4e91\u65f6\u95f4 \u4e09\u3001\u5b89\u88c5mari [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[152,2],"tags":[168],"class_list":["post-2175","post","type-post","status-publish","format-standard","hentry","category-k8s","category-linux","tag-prometheusmariadb"],"_links":{"self":[{"href":"http:\/\/113.45.254.23\/index.php?rest_route=\/wp\/v2\/posts\/2175","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/113.45.254.23\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/113.45.254.23\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/113.45.254.23\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/113.45.254.23\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2175"}],"version-history":[{"count":1,"href":"http:\/\/113.45.254.23\/index.php?rest_route=\/wp\/v2\/posts\/2175\/revisions"}],"predecessor-version":[{"id":2187,"href":"http:\/\/113.45.254.23\/index.php?rest_route=\/wp\/v2\/posts\/2175\/revisions\/2187"}],"wp:attachment":[{"href":"http:\/\/113.45.254.23\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/113.45.254.23\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2175"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/113.45.254.23\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}