{"id":4453,"date":"2023-02-21T14:58:06","date_gmt":"2023-02-21T06:58:06","guid":{"rendered":"https:\/\/km94.com\/?p=4453"},"modified":"2023-02-21T14:58:06","modified_gmt":"2023-02-21T06:58:06","slug":"hostinger-vps%e4%b8%bb%e6%9c%ba%e6%81%a2%e5%a4%8dmysql%e6%95%b0%e6%8d%ae%e5%ba%93%e7%9a%84%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/dy208.cn\/index.php\/2023\/02\/21\/hostinger-vps%e4%b8%bb%e6%9c%ba%e6%81%a2%e5%a4%8dmysql%e6%95%b0%e6%8d%ae%e5%ba%93%e7%9a%84%e6%96%b9%e6%b3%95\/","title":{"rendered":"Hostinger VPS\u4e3b\u673a\u6062\u590dMySQL\u6570\u636e\u5e93\u7684\u65b9\u6cd5"},"content":{"rendered":"<p>\u6211\u4eec\u5728\u4f7f\u7528\u56fd\u5916VPS\u4e3b\u673a\u65f6\u53ef\u80fd\u4f1a\u56e0\u4e3a\u7f51\u7edc\u95ee\u9898\u51fa\u73b0\u65e0\u6cd5\u542f\u52a8VPS\u7684\u60c5\u51b5\uff0c\u8fd9\u65f6\u53ef\u901a\u8fc7VPS\u6062\u590d\u6a21\u5f0f\u6216\u5907\u4efd\u6587\u4ef6\u6765\u6062\u590dMySQL\u6570\u636e\u5e93\uff0c\u907f\u514d\u9020\u6210\u6570\u636e\u4e22\u5931\u3002\u4e0b\u9762\u6765\u770b\u4e0b\u5982\u4f55\u5728Hostinger VPS\u4e2d\u4eceMySQL\u6570\u636e\u6587\u4ef6\u6765\u6062\u590dMySQL\u6570\u636e\u5e93\u3002<\/p>\n<p><strong>\u6b65\u9aa41\u3001\u5b89\u88c5\u548c\u505c\u6b62MySQL\u670d\u52a1\u5668<\/strong><\/p>\n<p>\u9996\u5148\uff0c\u901a\u8fc7SSH\u5de5\u5177\uff08\u5982PuTTY\u3001Xshell\u7b49\uff09\u8fde\u63a5\u6211\u4eec\u5f00\u901a\u7684Hostinger VPS\u4e3b\u673a\uff08\u672c\u6587\u4ee5\u7f8e\u56fdVPS\u4e3a\u4f8b\uff09\uff0c\u7136\u540e\u5728\u547d\u4ee4\u884c\u754c\u9762\u8fd0\u884c\u4e0b\u9762\u547d\u4ee4\u6765\u5b89\u88c5MySQL\u670d\u52a1\u5668\u3002<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">yum install mysql-server<\/code><\/pre>\n<p>MySQL\u670d\u52a1\u5668\u5b89\u88c5\u6210\u529f\u540e\uff0c\u8fd0\u884c\u4e0b\u9762\u547d\u4ee4\u505c\u6b62\u8be5\u670d\u52a1\u4ee5\u4fbf\u6dfb\u52a0\u5230\u6570\u636e\u6587\u4ef6\u5939\u4e2d\u3002<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">service mysql stop<\/code><\/pre>\n<p><strong>\u6b65\u9aa42\u3001\u590d\u5236\u6570\u636e<\/strong><\/p>\n<p>\u6211\u4eec\u53ef\u901a\u8fc7\u8fd0\u884c\u4e0b\u9762\u547d\u4ee4\u5c06Hostinger\u7f8e\u56fdVPS\u4e2d\u65e7\u7684MySQL\u6570\u636e\u590d\u5236\u5230\u65b0\u7684MySQL\u670d\u52a1\u5668\u6570\u636e\u6587\u4ef6\u4e2d\u3002<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">cp -rf \/mnt\/var\/lib\/mysql\/* \/var\/lib\/mysql<\/code><\/pre>\n<p>\u63a5\u4e0b\u6765\uff0c\u4fee\u6539\u6587\u4ef6\u6240\u6709\u6743\u3002<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">chown -R mysql:mysql \/var\/lib\/mysql<\/code><\/pre>\n<p>\u786e\u4fdd\u4fe1\u606f\u65e0\u8bef\u540e\uff0c\u91cd\u65b0\u542f\u52a8MySQL\u670d\u52a1\u5668\u3002<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">service mysql start<\/code><\/pre>\n<p><strong>\u6b65\u9aa43\u3001\u68c0\u67e5\u548c\u5bfc\u51fa\u6570\u636e\u5e93<\/strong><\/p>\n<p>\u4e3a\u4e86\u786e\u4fdd\u6570\u636e\u4e0d\u88ab\u7834\u574f\uff0c\u6211\u4eec\u9700\u8981\u68c0\u67e5\u5e76\u4fee\u590d\u6240\u6709\u6570\u636e\u5e93\u8868\uff0c\u76f8\u5173\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">mysqlcheck -rA<\/code><\/pre>\n<p>\u6700\u540e\u4e00\u6b65\uff0c\u5bfc\u51fa\u6570\u636e\u5e93\u3002<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">mysqldump &#8211;all-databases &gt; all_databases.sql<\/code><\/pre>\n<p>\u5982\u65e0\u610f\u5916\uff0c\u901a\u8fc7\u4ee5\u4e0a\u64cd\u4f5c\u540e\uff0c\u6211\u4eec\u4fbf\u53ef\u6210\u529f\u5730\u5c06Hostinger VPS\u4e3b\u673a\u4e2d\u7684MySQL\u6570\u636e\u5e93\u8fdb\u884c\u4e86\u6062\u590d\uff0c\u786e\u4fdd\u4e86\u6570\u636e\u5b8c\u6574\u6027\u3002<\/p>\n<div>\n<div>\n<\/div>\n<div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u4eec\u5728\u4f7f\u7528\u56fd\u5916VPS\u4e3b\u673a\u65f6\u53ef\u80fd\u4f1a\u56e0\u4e3a\u7f51\u7edc\u95ee\u9898\u51fa\u73b0\u65e0\u6cd5\u542f\u52a8VPS\u7684\u60c5\u51b5\uff0c\u8fd9\u65f6\u53ef\u901a\u8fc7VPS\u6062\u590d\u6a21\u5f0f\u6216\u5907\u4efd\u6587\u4ef6\u6765\u6062\u590d&hellip;<\/p>\n","protected":false},"author":1,"featured_media":4454,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,2],"tags":[],"class_list":["post-4453","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-zjjc","category-jc","entry"],"_links":{"self":[{"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/posts\/4453","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/comments?post=4453"}],"version-history":[{"count":0,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/posts\/4453\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/media?parent=4453"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/categories?post=4453"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/tags?post=4453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}