{"id":1641,"date":"2025-05-23T14:25:07","date_gmt":"2025-05-23T06:25:07","guid":{"rendered":"https:\/\/minglelu.cn\/?p=1641"},"modified":"2025-06-29T23:26:33","modified_gmt":"2025-06-29T15:26:33","slug":"proxysql%e5%ae%89%e8%a3%85%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/minglelu.cn\/index.php\/2025\/05\/23\/1641\/","title":{"rendered":"proxysql\u5b89\u88c5\u4f7f\u7528"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\"  src=\"https:\/\/minglelu.cn\/wp-content\/themes\/lolimeow-master\/assets\/images\/loading.gif\" data-src=\"https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-50.png\" class=\"lazy\" loading=\"lazy\" alt=\"\" class=\"wp-image-1726\" srcset=\"https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-50.png 868w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-50-300x178.png 300w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-50-768x457.png 768w\" sizes=\"(max-width: 868px) 100vw, 868px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><br>\u73af\u5883centos7.9 mysql5.7<br>\u5b98\u65b9\u5728\u7ebf\u6587\u6863<a href=\"https:\/\/proxysql.com\/documentation\/installing-proxysql\/\">https:\/\/proxysql.com\/documentation\/installing-proxysql\/<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e92\u8054\u7f51\u5b89\u88c5<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u73b0\u5728yum\u6e90\u4e2d\u6dfb\u52a0proxysql\u7684\u5b58\u50a8\u5e93\uff0c\u8fd9\u6837\u5c31\u4e0d\u9700\u8981\u4e00\u4e2a\u4e2a\u627e\u4f9d\u8d56\u5305<br><br>cat &lt;&lt;EOF | tee \/etc\/yum.repos.d\/proxysql.repo<br>[proxysql_repo]<br>name=ProxySQL repository<br>baseurl=https:\/\/repo.proxysql.com\/ProxySQL\/proxysql-2.7.x\/centos\/\\$releasever<br>gpgcheck=1<br>gpgkey=https:\/\/repo.proxysql.com\/ProxySQL\/proxysql-2.7.x\/repo_pub_key<br>EOF<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\"  src=\"https:\/\/minglelu.cn\/wp-content\/themes\/lolimeow-master\/assets\/images\/loading.gif\" data-src=\"https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-11-1024x223.png\" class=\"lazy\" loading=\"lazy\" alt=\"\" class=\"wp-image-1642\" srcset=\"https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-11-1024x223.png 1024w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-11-300x65.png 300w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-11-768x167.png 768w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-11.png 1403w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u5bf9\u4e8e 2.6.x \u7cfb\u5217\u7248\u672c\uff0c\u8bf7https:\/\/repo.proxysql.com\/ProxySQL\/proxysql-2.6.x\/centos\/\\$releasever\u4f7f\u7528<br>\u5bf9\u4e8e 2.5.x \u7cfb\u5217\u7248\u672c\uff0c\u8bf7https:\/\/repo.proxysql.com\/ProxySQL\/proxysql-2.5.x\/centos\/\\$releasever\u4f7f\u7528<br>\u5bf9\u4e8e 2.4.x \u7cfb\u5217\u7248\u672c\uff0c\u8bf7https:\/\/repo.proxysql.com\/ProxySQL\/proxysql-2.4.x\/centos\/\\$releasever\u4f7f\u7528<br>\u5bf9\u4e8e 2.3.x \u7cfb\u5217\u7248\u672c\uff0c\u8bf7https:\/\/repo.proxysql.com\/ProxySQL\/proxysql-2.3.x\/centos\/\\$releasever\u4f7f\u7528<br>\u5bf9\u4e8e 2.2.x \u7cfb\u5217\u7248\u672c\uff0c\u8bf7https:\/\/repo.proxysql.com\/ProxySQL\/proxysql-2.2.x\/centos\/\\$releasever\u4f7f\u7528<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7136\u540e\u76f4\u63a5yum\u5b89\u88c5<br>yum install proxysql<br>\u6216\u8005\u5b89\u88c5\u7279\u5b9a\u7248\u672cyum install proxysql-[version]<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\"  src=\"https:\/\/minglelu.cn\/wp-content\/themes\/lolimeow-master\/assets\/images\/loading.gif\" data-src=\"https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-12-1024x206.png\" class=\"lazy\" loading=\"lazy\" alt=\"\" class=\"wp-image-1643\" srcset=\"https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-12-1024x206.png 1024w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-12-300x60.png 300w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-12-768x155.png 768w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-12-1536x309.png 1536w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-12.png 1685w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u7136\u540e\u770b\u4e00\u4e0b\u7248\u672c\u53f7\u542f\u52a8\u670d\u52a1\u3002\u4e00\u5207\u6b63\u5e38\u8fd9\u6837\u5c31\u53ef\u4ee5\u8fdb\u884c\u914d\u7f6e\u4e86<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\"  src=\"https:\/\/minglelu.cn\/wp-content\/themes\/lolimeow-master\/assets\/images\/loading.gif\" data-src=\"https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-15-1024x251.png\" class=\"lazy\" loading=\"lazy\" alt=\"\" class=\"wp-image-1646\" srcset=\"https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-15-1024x251.png 1024w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-15-300x73.png 300w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-15-768x188.png 768w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-15.png 1410w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u5b89\u88c5\u65f6\u5019\u63d0\u793a\u9519\u8bef<br>1\u3001\u63d0\u793a\u7f3a\u5c11\u4f9d\u8d56libmysqlclient.so.18(64bit)(\u4e00\u822c\u5b89\u88c5MySQL\u7684\u65f6\u5019\u6ca1\u6709\u5b89\u88c5compat\u5e93\u5bfc\u81f4\u5f97)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\"  src=\"https:\/\/minglelu.cn\/wp-content\/themes\/lolimeow-master\/assets\/images\/loading.gif\" data-src=\"https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-47.png\" class=\"lazy\" loading=\"lazy\" alt=\"\" class=\"wp-image-1722\" srcset=\"https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-47.png 982w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-47-300x46.png 300w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-47-768x118.png 768w\" sizes=\"(max-width: 982px) 100vw, 982px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><br>2\u3001\u5230https:\/\/pkgs.org\/\u4e0b\u8f7d\u5bf9\u5e94\u7248\u672c\u7684RPM\u5305\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">wget https:\/\/repo.mysql.com\/yum\/mysql-5.7-community\/el\/7\/x86_64\/mysql-community-libs-compat-5.7.32-1.el7.x86_64.rpm<br><br>3\u3001\u5b89\u88c5mysql-community-libs-compat-5.7.32-1.el7.x86_64.rpm<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">rpm -vih mysql-community-libs-compat-5.7.32-1.el7.x86_64.rpm<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\"  src=\"https:\/\/minglelu.cn\/wp-content\/themes\/lolimeow-master\/assets\/images\/loading.gif\" data-src=\"https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-48-1024x355.png\" class=\"lazy\" loading=\"lazy\" alt=\"\" class=\"wp-image-1723\" srcset=\"https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-48-1024x355.png 1024w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-48-300x104.png 300w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-48-768x266.png 768w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-48-1536x532.png 1536w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-48.png 1611w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u91cd\u65b0\u6309\u7167\u5c31\u53ef\u6062\u590d<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\"  src=\"https:\/\/minglelu.cn\/wp-content\/themes\/lolimeow-master\/assets\/images\/loading.gif\" data-src=\"https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-49-1024x135.png\" class=\"lazy\" loading=\"lazy\" alt=\"\" class=\"wp-image-1724\" srcset=\"https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-49-1024x135.png 1024w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-49-300x40.png 300w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-49-768x101.png 768w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-49-1536x203.png 1536w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-49.png 1574w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><br>\u95ee\u9898\u89e3\u51b3<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5185\u7f51\u5b89\u88c5<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u628aproxysql\u4f9d\u8d56\u5168\u90e8\u6253\u5305<br>\u4f20\u7ed9\u670d\u52a1\u5668\u5728\u6240\u5728\u76ee\u5f55\u8fdb\u884cyum\u5b89\u88c5\u5373\u53ef<br>yum localinstall *.rpm<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\"  src=\"https:\/\/minglelu.cn\/wp-content\/themes\/lolimeow-master\/assets\/images\/loading.gif\" data-src=\"https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-16-1024x187.png\" class=\"lazy\" loading=\"lazy\" alt=\"\" class=\"wp-image-1648\" srcset=\"https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-16-1024x187.png 1024w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-16-300x55.png 300w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-16-768x140.png 768w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-16-1536x281.png 1536w, https:\/\/minglelu.cn\/wp-content\/uploads\/2025\/05\/image-16.png 1675w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u542f\u52a8proxysql\u670d\u52a1\u65b9\u5f0f<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f55\u65f6\u4f7f\u7528\uff1a<br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">proxysql &#8211;initial -c \/etc\/proxysql.cnf<\/mark>   <br> &#8212;<strong>\u8bfb\u53d6\u914d\u7f6e\u6587\u4ef6\u5e76\u5199\u5165 <code>\/var\/lib\/proxysql\/proxysql.db<\/code><\/strong>\uff0c\u7136\u540e\u9000\u51fa\uff0c\u4e0d\u4f1a\u542f\u52a8\u670d\u52a1\u3002<br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">proxysql &#8211;initial -f &#8211;config \/etc\/proxysql.cnf<\/mark><br>\u540c\u6837\u4f1a\u521d\u59cb\u5316\u6570\u636e\u5e93\uff0c\u4f46 <strong>\u6267\u884c\u5b8c\u540e\u4f1a\u201c\u524d\u53f0\u542f\u52a8\u201dProxySQL \u670d\u52a1<\/strong><br><code>-f<\/code> \u8868\u793a <strong>foreground\uff08\u524d\u53f0\uff09\u8fd0\u884c<\/strong>\uff0c\u8fd0\u884c\u540e\u4f1a\u5360\u636e\u4f60\u7684\u7ec8\u7aef\uff08\u9000\u51fa\u670d\u52a1\u4e5f\u4f1a\u4e2d\u65ad\uff09<br><code>--config<\/code> \u4e0e <code>-c<\/code> \u4f5c\u7528\u4e00\u6837\uff0c\u90fd\u662f\u6307\u5b9a\u914d\u7f6e\u6587\u4ef6<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><br>\u6216 <\/mark><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">systemctl start proxysql-initial<\/mark><br><br>\u9700\u8981\u5b8c\u5168\u91cd\u7f6e ProxySQL \u914d\u7f6e\u65f6:\u5982\u679cproxysql.db \u6587\u4ef6\u635f\u574f\uff0c\u6216\u8005\u5b8c\u5168\u6e05\u9664\u6240\u6709\u8fd0\u884c\u65f6\u914d\u7f6e\uff0c\u5e76\u4ece \/etc\/proxysql.cnf \u91cd\u65b0\u5f00\u59cb\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528\u6b64\u547d\u4ee4\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table alignleft is-style-regular has-small-font-size\"><table class=\"has-fixed-layout\"><thead><tr><th>\u5bf9\u6bd4\u9879<\/th><th><code>systemctl start proxysql-initial<\/code><\/th><th><code>proxysql --initial -c \/etc\/proxysql.cnf<\/code><\/th><\/tr><\/thead><tbody><tr><td>\u521d\u59cb\u5316\u542f\u52a8\u65b9\u5f0f<\/td><td>\u4f7f\u7528 systemd \u670d\u52a1<\/td><td>\u76f4\u63a5\u547d\u4ee4\u884c\u624b\u52a8\u6267\u884c<\/td><\/tr><tr><td>\u914d\u7f6e\u6587\u4ef6\u6765\u6e90<\/td><td>\u56fa\u5b9a\u8bfb\u53d6 systemd \u5355\u5143\u914d\u7f6e\u4e2d\u8bbe\u7f6e\u7684\u73af\u5883\u53d8\u91cf\uff08\u9ed8\u8ba4\u662f <code>\/etc\/proxysql.cnf<\/code>\uff09<\/td><td>\u53ef\u6307\u5b9a\u4efb\u610f\u914d\u7f6e\u6587\u4ef6\uff08\u7075\u6d3b\uff09<\/td><\/tr><tr><td>\u540e\u53f0\u8fd0\u884c<\/td><td>\u4f1a\u81ea\u52a8\u542f\u52a8 <code>proxysql.service<\/code> \u4f5c\u4e3a daemon<\/td><td>\u9ed8\u8ba4\u524d\u53f0\u8fd0\u884c\uff08\u53ef\u52a0 <code>-d<\/code> \u53c2\u6570\u540e\u53f0\u8fd0\u884c\uff09<\/td><\/tr><tr><td>\u4f7f\u7528\u6743\u9650<\/td><td>\u9700\u6709 <code>systemctl<\/code> \u6743\u9650\uff0c\u901a\u5e38 root<\/td><td>\u4efb\u610f\u6709\u6743\u9650\u7684\u7528\u6237\u90fd\u80fd\u6267\u884c<\/td><\/tr><tr><td>\u540e\u7eed\u7ba1\u7406<\/td><td>\u5bb9\u6613\u7528 <code>systemctl restart proxysql<\/code> \u7ba1\u7406\u751f\u547d\u5468\u671f<\/td><td>\u7ba1\u7406\u4e0d\u7edf\u4e00\uff0c\u9700\u624b\u52a8\u5904\u7406\u540e\u53f0\/\u524d\u53f0<\/td><\/tr><\/tbody><\/table><\/div><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>\n\u6b63\u5e38\u542f\u52a8\uff1a\nsystemctl start proxysql\nProxySQL \u7684\u5e38\u89c4\u542f\u52a8\u65b9\u5f0f\u3002\u5b83\u4f1a\u542f\u52a8 ProxySQL \u670d\u52a1\uff0c\u5e76\u4ece\u5df2\u5b58\u5728\u7684 proxysql.db \u6587\u4ef6\u4e2d\u52a0\u8f7d\u914d\u7f6e\u3002\u5982\u679c proxysql.db \u4e0d\u5b58\u5728\uff0c\u5b83\u4f1a\u56de\u9000\u5230\u4ece \/etc\/proxysql.cnf \u52a0\u8f7d\u3002\n\u5e94\u7528\u5df2\u4fdd\u5b58\u7684\u914d\u7f6e:\u5f53\u5728 admin \u754c\u9762\u4fee\u6539\u4e86\u914d\u7f6e\u5e76\u6267\u884c\u4e86 SAVE ADMIN VARIABLES TO DISK; \u540e\uff0c\u4e0b\u6b21\u542f\u52a8 ProxySQL \u65f6\uff0c\u5b83\u4f1a\u81ea\u52a8\u52a0\u8f7d\u8fd9\u4e9b\u5df2\u4fdd\u5b58\u7684\u914d\u7f6e\u3002\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-table is-style-regular has-small-font-size\"><table class=\"has-fixed-layout\"><thead><tr><th>\u7279\u6027<\/th><th><code>proxysql --initial<\/code><\/th><th><code>systemctl start proxysql<\/code>&nbsp;(\u5e38\u89c4\u542f\u52a8)<\/th><\/tr><\/thead><tbody><tr><td><strong>\u914d\u7f6e\u6765\u6e90<\/strong><\/td><td>\u5f3a\u5236\u4ece&nbsp;<code>\/etc\/proxysql.cnf<\/code>&nbsp;\u521d\u59cb\u5316&nbsp;<code>proxysql.db<\/code><\/td><td>\u4f18\u5148\u4ece&nbsp;<code>proxysql.db<\/code>&nbsp;\u52a0\u8f7d\uff0c\u5982\u679c\u4e0d\u5b58\u5728\u5219\u4ece&nbsp;<code>proxysql.cnf<\/code><\/td><\/tr><tr><td><strong><code>proxysql.db<\/code><\/strong><\/td><td>\u4f1a\u88ab\u521b\u5efa\u6216\u8986\u76d6<\/td><td>\u4ece\u5df2\u5b58\u5728\u7684&nbsp;<code>proxysql.db<\/code>&nbsp;\u52a0\u8f7d<\/td><\/tr><tr><td><strong>\u4f7f\u7528\u573a\u666f<\/strong><\/td><td>\u9996\u6b21\u5b89\u88c5\u3001\u5b8c\u5168\u91cd\u7f6e\u3001\u914d\u7f6e\u6587\u4ef6\u91cd\u5927\u66f4\u6539<\/td><td>\u65e5\u5e38\u542f\u52a8\u3001\u91cd\u542f\u3001\u5e94\u7528\u5df2\u4fdd\u5b58\u7684\u8fd0\u884c\u65f6\u914d\u7f6e<\/td><\/tr><tr><td><strong>\u6743\u9650\u5f71\u54cd<\/strong><\/td><td>\u53ef\u80fd\u5bfc\u81f4&nbsp;<code>proxysql.db<\/code>&nbsp;\u6240\u6709\u8005\u53d8\u4e3a&nbsp;<code>root<\/code><\/td><td>\u901a\u5e38\u4ee5&nbsp;<code>proxysql<\/code>&nbsp;\u7528\u6237\u8fd0\u884c\uff0c\u4e0d\u4f1a\u6539\u53d8\u6587\u4ef6\u6240\u6709\u8005<\/td><\/tr><\/tbody><\/table><\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u5378\u8f7d ProxySQL \u8f6f\u4ef6\u5305<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo rpm -e proxysql\n<\/code>\u5982\u679c\u63d0\u793a\u4f9d\u8d56\u9519\u8bef\uff0c\u53ef\u5f3a\u5236\u5378\u8f7d\uff1a\n<code>sudo rpm -e --nodeps proxysql<\/code>\n\u6216\u8005\uff0c\u5982\u679c\u662f\u7528 <code>yum<\/code> \u5b89\u88c5\u7684\uff0c\u4e5f\u53ef\u4ee5\u7528\uff1a\n<code>sudo yum remove -y proxysql<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 \u4e8c\u3001\u5220\u9664\u914d\u7f6e\u6587\u4ef6\u548c\u6570\u636e\u76ee\u5f55\uff08\u91cd\u70b9\uff09<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">ProxySQL \u7684\u9ed8\u8ba4\u914d\u7f6e\u548c\u6570\u636e\u6587\u4ef6\u901a\u5e38\u5728\u4ee5\u4e0b\u8def\u5f84\u4e2d\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo rm -rf \/etc\/proxysql.cnf\nsudo rm -rf \/etc\/proxysql\/\nsudo rm -rf \/var\/lib\/proxysql\/\nsudo rm -rf \/var\/run\/proxysql\/\n<\/code>\n\u53ef\u4ee5\u5148\u786e\u8ba4\u662f\u5426\u5b58\u5728\u8fd9\u4e9b\u76ee\u5f55\uff1a\n\n<code>ls \/etc\/proxysql*\nls \/var\/lib\/proxysql\/<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 \u4e09\u3001\u5220\u9664\u65e5\u5fd7\u6587\u4ef6\uff08\u5982\u679c\u5b58\u5728\uff09<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo rm -rf \/var\/log\/proxysql.log\n<\/code>\u6216\u8005\u68c0\u67e5 <code>\/var\/log\/<\/code> \u4e0b\u662f\u5426\u6709 <code>proxysql\/<\/code> \u5b50\u76ee\u5f55\uff1a<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo rm -rf \/var\/log\/proxysql\/<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 \u56db\u3001\u68c0\u67e5 systemd \u670d\u52a1\u6587\u4ef6\uff08\u53ef\u9009\uff09<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u6709\u65f6\u53ef\u80fd\u8fd8\u6709\u7cfb\u7edf\u670d\u52a1\u6587\u4ef6\u6b8b\u7559\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo rm -f \/etc\/systemd\/system\/proxysql.service<br>sudo systemctl daemon-reload<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 \u4e94\u3001\u68c0\u67e5\u662f\u5426\u8fd8\u5b58\u5728\u6267\u884c\u7a0b\u5e8f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u4f60\u66fe\u7ecf\u624b\u52a8\u89e3\u538b\u6216\u590d\u5236\u6267\u884c\u6587\u4ef6\uff0c\u53ef\u80fd\u8fd8\u6709\u6b8b\u7559\u7684\u53ef\u6267\u884c\u6587\u4ef6\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>which proxysql\n<\/code>\u5982\u679c\u6709\u7ed3\u679c\uff0c\u6bd4\u5982 <code>\/usr\/bin\/proxysql<\/code>\uff0c\u5219\u5220\u9664\uff1a\n<code>sudo rm -f \/usr\/bin\/proxysql<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 \u516d\u3001\u786e\u8ba4\u662f\u5426\u5df2\u5f7b\u5e95\u6e05\u9664<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>rpm -qa | grep proxysql<br>ps aux | grep proxysql<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u73af\u5883centos7.9 mysql5.7\u5b98\u65b9\u5728\u7ebf\u6587\u6863https:\/\/proxysql.com\/documentation\/installing-proxysql\/ \u4e92\u8054\u7f51\u5b89\u88c5 \u73b0\u5728yum\u6e90\u4e2d\u6dfb\u52a0proxysql\u7684\u5b58\u50a8\u5e93\uff0c\u8fd9\u6837\u5c31\u4e0d\u9700\u8981\u4e00\u4e2a\u4e2a\u627e\u4f9d\u8d56\u5305 cat &lt;&lt;EOF | tee \/etc\/yum.repos.d\/proxysql.repo[proxysql_repo]name=Prox [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1726,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,17],"tags":[],"class_list":["post-1641","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud-computing","category-17"],"_links":{"self":[{"href":"https:\/\/minglelu.cn\/index.php\/wp-json\/wp\/v2\/posts\/1641","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/minglelu.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/minglelu.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/minglelu.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/minglelu.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1641"}],"version-history":[{"count":15,"href":"https:\/\/minglelu.cn\/index.php\/wp-json\/wp\/v2\/posts\/1641\/revisions"}],"predecessor-version":[{"id":1754,"href":"https:\/\/minglelu.cn\/index.php\/wp-json\/wp\/v2\/posts\/1641\/revisions\/1754"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/minglelu.cn\/index.php\/wp-json\/wp\/v2\/media\/1726"}],"wp:attachment":[{"href":"https:\/\/minglelu.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1641"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/minglelu.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1641"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/minglelu.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1641"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}