{"id":170,"date":"2021-01-25T18:10:38","date_gmt":"2021-01-25T10:10:38","guid":{"rendered":"http:\/\/madapapa.com\/wordpress\/?p=170"},"modified":"2021-01-25T19:48:03","modified_gmt":"2021-01-25T11:48:03","slug":"curl-he-mbstring-geng-xincentos7-jie-juemysqlsock","status":"publish","type":"post","link":"http:\/\/madapapa.com\/wordpress\/?p=170","title":{"rendered":"curl \u548c mbstring\uff0c\u66f4\u65b0CentOs7,\u89e3\u51b3mysql.sock\u4e22\u5931\u95ee\u9898"},"content":{"rendered":"<h2 id=\"toc_0\">\u5bf9\u4e8eUbuntu.20\uff1a<\/h2>\n<p>\u9700\u8981\u5b89\u88c5\u5bf9\u5e94php\u7248\u672c\u7684curl\u548cmbstring<\/p>\n<pre><code class=\"language-text\">apt-get install php8.0-curl\napt-get install php8.0-mbstring\n<\/code><\/pre>\n<p>\u4fee\u6539fpm\u76ee\u5f55\u4e0b\u7684php.inn\u6587\u4ef6<br \/>\n<img decoding=\"async\" src=\"http:\/\/madapapa.com\/wordpress\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-25-at-6.15.20-PM.png\" alt=\"Screen Shot 2021-01-25 at 6.15.20 PM\"\/><\/p>\n<p>\u91cd\u542fphp\u670d\u52a1<\/p>\n<pre><code class=\"language-text\">systemctl restart php8.0-fpm.service\n<\/code><\/pre>\n<h2 id=\"toc_1\">\u5bf9\u4e8eCentos7:<\/h2>\n<p>curl\u662f\u5185\u5efa\u7684\uff0c\u6240\u4ee5\u53ea\u7528\u5b89\u88c5mbstring<\/p>\n<pre><code class=\"language-text\">yum install php-mbstring\n<\/code><\/pre>\n<h2 id=\"toc_2\">\u66f4\u65b0Centos<\/h2>\n<p>\u9996\u5148\u68c0\u67e5CentOS\u53ef\u7528\u66f4\u65b0\uff0c\u663e\u793a\u5e94\u7528\u548c\u6838\u5fc3\u7cfb\u7edf\u5347\u7ea7<\/p>\n<pre><code class=\"language-text\">yum check-update\n<\/code><\/pre>\n<p>\u7136\u540e\u6e05\u7406\u4ee5\u524d\u7684\u8f6f\u4ef6\u5305\uff0c\u5e76\u91cd\u542f<\/p>\n<pre><code class=\"language-text\">yum clean all\n<\/code><\/pre>\n<pre><code class=\"language-text\"># reboot\n<\/code><\/pre>\n<p>\u5f00\u59cb\u5347\u7ea7<\/p>\n<pre><code class=\"language-text\">yum update\n<\/code><\/pre>\n<p>\u67e5\u770blinux\u7248\u672c<\/p>\n<pre><code class=\"language-text\">cat \/etc\/redhat-release\n<\/code><\/pre>\n<h2 id=\"toc_3\">\u6062\u590dmysql.sock\u6587\u4ef6<\/h2>\n<p>\u8fd9\u65f6\u53d1\u73b0\u6d4f\u89c8\u5668\u91cc\u663e\u793a\u6570\u636e\u5e93\u65e0\u6cd5\u8fde\u63a5\uff0crepair\u9875\u9762\u4e5f\u6253\u4e0d\u5f00\uff0c\u8fdb\u5165mysql\u663e\u793aERROR2002\uff0c\u540c\u65f6mariadb\u7684\u72b6\u6001\u4e5f\u53d8\u6210inactive<\/p>\n<pre><code class=\"language-text\">#mysql\nERROR 2002 (HY000): Can&#39;t connect to local MySQL server through socket &#39;\/var\/lib\/mysql\/mysql.sock&#39; (2)\n\n<\/code><\/pre>\n<p>\u4f7f\u7528find \u547d\u4ee4\u4e5f\u627e\u4e0d\u5230mysql.sock<br \/>\n\u539f\u56e0\u5982\u4e0b\u201c\u8fde\u63a5localhost\u901a\u5e38\u901a\u8fc7\u4e00\u4e2aUnix\u57df\u5957\u63a5\u5b57\u6587\u4ef6\u8fdb\u884c\uff0c\u4e00\u822c\u662f\/tmp\/mysql.sock\u3002\u5982\u679c\u5957\u63a5\u5b57\u6587\u4ef6\u88ab\u5220\u9664\u4e86\uff0c\u672c\u5730\u5ba2\u6237\u5c31\u4e0d\u80fd\u8fde\u63a5\u3002\u8fd9\u53ef\u80fd\u53d1\u751f\u5728\u4f60\u7684\u7cfb\u7edf\u8fd0\u884c\u4e00\u4e2acron\u4efb\u52a1\u5220\u9664\u4e86\/tmp\u4e0b\u7684\u4e34\u65f6\u6587\u4ef6\u3002<\/p>\n<p>\u5982\u679c\u4f60\u56e0\u4e3a\u4e22\u5931\u5957\u63a5\u5b57\u6587\u4ef6\u800c\u4e0d\u80fd\u8fde\u63a5\uff0c\u4f60\u53ef\u4ee5\u7b80\u5355\u5730\u901a\u8fc7\u91cd\u542f\u670d\u52a1\u5668\u91cd\u65b0\u521b\u5efa\u5f97\u5230\u5b83\u3002\u56e0\u4e3a\u670d\u52a1\u5668\u5728\u542f\u52a8\u65f6\u91cd\u65b0\u521b\u5efa\u5b83\u201d<\/p>\n<p>\u53c2\u8003<br \/>\n<a href=\"rootpapawagon%20\/%20%5B5:34%5D\/mysql%0AERROR%202002%20(HY000):%20Can&#x27;t%20connect%20to%20local%20MySQL%20server%20through%20socket%20&#x27;\/var\/lib\/mysql\/mysql.sock&#x27;%20(2\">mysql.sock\u95ee\u9898<\/a><br \/>\n)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5bf9\u4e8eUbuntu.20\uff1a \u9700\u8981\u5b89\u88c5\u5bf9\u5e94php\u7248\u672c\u7684curl\u548cmbstring apt-get install php8.0-curl apt-get install php8.0-mbstring \u4fee\u6539fpm\u76ee\u5f55\u4e0b\u7684php.inn\u6587\u4ef6 \u91cd\u542fphp\u670d\u52a1 systemctl restart php8.0-fpm.service \u5bf9\u4e8eCentos7: curl\u662f\u5185\u5efa\u7684\uff0c\u6240\u4ee5\u53ea\u7528\u5b89\u88c5mbstring yum install php-mbstring \u66f4\u65b0Centos \u9996\u5148\u68c0\u67e5CentOS\u53ef\u7528\u66f4\u65b0\uff0c\u663e\u793a\u5e94\u7528\u548c\u6838\u5fc3\u7cfb\u7edf\u5347\u7ea7 yum check-update \u7136\u540e\u6e05\u7406\u4ee5\u524d\u7684\u8f6f\u4ef6\u5305\uff0c\u5e76\u91cd\u542f yum clean all # reboot \u5f00\u59cb\u5347\u7ea7 yum update \u67e5\u770blinux\u7248\u672c cat \/etc\/redhat-release \u6062\u590dmysql.sock\u6587\u4ef6 \u8fd9\u65f6\u53d1\u73b0\u6d4f\u89c8\u5668\u91cc\u663e\u793a\u6570\u636e\u5e93\u65e0\u6cd5\u8fde\u63a5\uff0crepair\u9875\u9762\u4e5f\u6253\u4e0d\u5f00\uff0c\u8fdb\u5165mysql\u663e\u793aERROR2002\uff0c\u540c\u65f6mariadb\u7684\u72b6\u6001\u4e5f\u53d8\u6210inactive #mysql ERROR 2002 (HY000): Can&#39;t connect to local MySQL server through socket &#39;\/var\/lib\/mysql\/mysql.sock&#39; (2) \u4f7f\u7528find \u547d\u4ee4\u4e5f\u627e\u4e0d\u5230mysql.sock \u539f\u56e0\u5982\u4e0b\u201c\u8fde\u63a5localhost\u901a\u5e38\u901a\u8fc7\u4e00\u4e2aUnix\u57df\u5957\u63a5\u5b57\u6587\u4ef6\u8fdb\u884c\uff0c\u4e00\u822c\u662f\/tmp\/mysql.sock\u3002\u5982\u679c\u5957\u63a5\u5b57\u6587\u4ef6\u88ab\u5220\u9664\u4e86\uff0c\u672c\u5730\u5ba2\u6237\u5c31\u4e0d\u80fd\u8fde\u63a5\u3002\u8fd9\u53ef\u80fd\u53d1\u751f\u5728\u4f60\u7684\u7cfb\u7edf\u8fd0\u884c\u4e00\u4e2acron\u4efb\u52a1\u5220\u9664\u4e86\/tmp\u4e0b\u7684\u4e34\u65f6\u6587\u4ef6\u3002 \u5982\u679c\u4f60\u56e0\u4e3a\u4e22\u5931\u5957\u63a5\u5b57\u6587\u4ef6\u800c\u4e0d\u80fd\u8fde\u63a5\uff0c\u4f60\u53ef\u4ee5\u7b80\u5355\u5730\u901a\u8fc7\u91cd\u542f\u670d\u52a1\u5668\u91cd\u65b0\u521b\u5efa\u5f97\u5230\u5b83\u3002\u56e0\u4e3a\u670d\u52a1\u5668\u5728\u542f\u52a8\u65f6\u91cd\u65b0\u521b\u5efa\u5b83\u201d \u53c2\u8003 &hellip; <a href=\"http:\/\/madapapa.com\/wordpress\/?p=170\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">curl \u548c mbstring\uff0c\u66f4\u65b0CentOs7,\u89e3\u51b3mysql.sock\u4e22\u5931\u95ee\u9898<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-170","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/170","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=170"}],"version-history":[{"count":1,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/170\/revisions"}],"predecessor-version":[{"id":171,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/170\/revisions\/171"}],"wp:attachment":[{"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=170"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}