{"id":112603,"date":"2026-10-04T07:16:58","date_gmt":"2026-10-03T23:16:58","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/112603.html"},"modified":"2026-10-04T07:16:58","modified_gmt":"2026-10-03T23:16:58","slug":"linux%e8%bf%90%e7%bb%b4%ef%bc%9amariadb%e7%9f%a5%e8%af%86%e7%82%b9%e6%80%bb%e7%bb%93","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/112603.html","title":{"rendered":"Linux\u8fd0\u7ef4\uff1aMariaDB\u77e5\u8bc6\u70b9\u603b\u7ed3"},"content":{"rendered":"<h2>MariaDB\u77e5\u8bc6\u70b9\u603b\u7ed3<\/h2>\n<p>MariaDB\u662fMySQL\u7684\u5206\u652f&#xff0c;CentOS7\u9ed8\u8ba4\u6570\u636e\u5e93&#xff0c;\u7aef\u53e33306&#xff0c;\u6838\u5fc3\u5305\u542b\u8fdb\u7a0b\u3001\u5b89\u88c5\u52a0\u56fa\u3001\u914d\u7f6e\u6587\u4ef6\u3001\u5e93\u8868SQL\u64cd\u4f5c\u3001\u7528\u6237\u6743\u9650\u3001\u5bc6\u7801\u6545\u969c\u5904\u7406\u3001\u5907\u4efd\u6062\u590d\u3001\u4e3b\u4ece\u590d\u5236\u3002<\/p>\n<h3>1. \u53cc\u8fdb\u7a0b\u6a21\u578b<\/h3>\n<li>mysqld_safe&#xff1a;\u5b88\u62a4\u76d1\u63a7\u8fdb\u7a0b&#xff1a;\u542f\u52a8\u3001\u76d1\u63a7mysqld&#xff0c;\u4e3b\u8fdb\u7a0b\u5d29\u6e83\u81ea\u52a8\u91cd\u542f&#xff1b;\u7ba1\u7406\u9519\u8bef\u65e5\u5fd7\u4e0e\u542f\u52a8\u53c2\u6570\u3002<\/li>\n<li>mysqld&#xff1a;\u6570\u636e\u5e93\u6838\u5fc3\u4e3b\u8fdb\u7a0b&#xff1a;\u76d1\u542c3306\u7aef\u53e3&#xff0c;\u5904\u7406\u5ba2\u6237\u7aef\u8fde\u63a5\u3001SQL\u8bfb\u5199\u3001\u4e8b\u52a1\u3001\u78c1\u76d8\u6570\u636e\u64cd\u4f5c\u3002<\/li>\n<p>\u5173\u7cfb&#xff1a;mysqld_safe\u751f\u6210mysqld\u5b50\u8fdb\u7a0b&#xff1b;\u76f4\u63a5kill mysqld\u4f1a\u88ab\u5b88\u62a4\u8fdb\u7a0b\u62c9\u8d77&#xff1b;systemctl\u505c\u6b62mariadb\u4e24\u4e2a\u8fdb\u7a0b\u540c\u65f6\u5173\u95ed\u3002<\/p>\n<h3>2. \u5b89\u88c5\u4e0e\u5b89\u5168\u52a0\u56fa<\/h3>\n<li>\u8f6f\u4ef6\u5305&#xff1a;mariadb\u2011server\u670d\u52a1\u7aef&#xff0c;mariadb\u5ba2\u6237\u7aef\u5de5\u5177\u3002<\/li>\n<li>\u542f\u52a8&#xff1a;systemctl enable &#8211;now mariadb&#xff1b;\u9632\u706b\u5899\u653e\u884cmysql\u670d\u52a1\u3002<\/li>\n<li>\u52a0\u56fa\u811a\u672cmysql_secure_installation\u4ea4\u4e92\u5f0f\u5b8c\u6210&#xff1a;\u8bbe\u7f6eroot\u5bc6\u7801\u3001\u7981\u6b62root\u8fdc\u7a0b\u767b\u5f55\u3001\u5220\u9664\u533f\u540d\u8d26\u53f7\u3001\u5220\u9664test\u6d4b\u8bd5\u5e93\u3002<\/li>\n<h3>3. \u914d\u7f6e\u6587\u4ef6\u4f53\u7cfb<\/h3>\n<ul>\n<li>\/etc\/my.cnf&#xff1a;\u4e3b\u914d\u7f6e&#xff0c;\u4f18\u5148\u7ea7\u6700\u9ad8\u3002<\/li>\n<li>\/etc\/my.cnf.d\/\u7ec6\u5206\u914d\u7f6e\u76ee\u5f55\n<ul>\n<li>server.cnf&#xff1a;[mysqld]\/[mysqld_safe]&#xff0c;\u63a7\u5236\u6570\u636e\u5e93\u670d\u52a1\u7aef&#xff08;\u7aef\u53e3\u3001\u76d1\u542c\u5730\u5740\u3001\u6570\u636e\u76ee\u5f55\u3001\u5f15\u64ce\u3001\u65e5\u5fd7&#xff09;<\/li>\n<li>client.cnf\u3001mysql\u2011clients.cnf&#xff1a;\u63a7\u5236mysql\u5ba2\u6237\u7aef\u8fde\u63a5\u53c2\u6570\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>4. \u6570\u636e\u5e93\u5e93\u64cd\u4f5cSQL<\/h3>\n<table>\n<tr>\u529f\u80fd\u547d\u4ee4<\/tr>\n<tbody>\n<tr>\n<td>\u67e5\u770b\u6240\u6709\u5e93<\/td>\n<td>SHOW DATABASES;<\/td>\n<\/tr>\n<tr>\n<td>\u521b\u5efa\u5e93<\/td>\n<td>CREATE DATABASE [IF NOT EXISTS] \u5e93\u540d;<\/td>\n<\/tr>\n<tr>\n<td>\u5220\u9664\u5e93<\/td>\n<td>DROP DATABASE [IF EXISTS] \u5e93\u540d;<\/td>\n<\/tr>\n<tr>\n<td>\u5207\u6362\u5e93<\/td>\n<td>USE \u5e93\u540d;<\/td>\n<\/tr>\n<tr>\n<td>\u67e5\u770b\u5f53\u524d\u5e93<\/td>\n<td>SELECT DATABASE();<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>5. \u6570\u636e\u8868\u64cd\u4f5cSQL<\/h3>\n<li>\u57fa\u7840&#xff1a;SHOW TABLES;\u67e5\u770b\u8868&#xff1b;DESCRIBE \u8868\u540d;\u67e5\u770b\u8868\u7ed3\u6784&#xff1b;CREATE TABLE\u5efa\u8868&#xff1b;DROP TABLE\u5220\u8868\u3002<\/li>\n<li>DML\u6570\u636e\u64cd\u4f5c\n<ul>\n<li>\u67e5\u8be2&#xff1a;SELECT&#xff0c;\u652f\u6301\u6307\u5b9a\u5217\u3001WHERE\u6761\u4ef6\u3001ORDER BY\u6392\u5e8f&#xff1b;\u8fd0\u7b97\u7b26&#xff1a;&gt; &lt; &#061; !&#061; BETWEEN AND IN LIKE AND OR\u3002<\/li>\n<li>\u805a\u5408\u51fd\u6570&#xff1a;COUNT\u3001SUM\u3001AVG\u3001MAX\u3001MIN&#xff0c;\u642d\u914dGROUP BY\u5206\u7ec4\u7edf\u8ba1\u3002<\/li>\n<li>\u63d2\u5165&#xff1a;INSERT INTO \u8868(\u5217) VALUES(\u503c)<\/li>\n<li>\u66f4\u65b0&#xff1a;UPDATE \u8868 SET \u5217&#061;\u503c WHERE\u6761\u4ef6&#xff0c;\u4e0d\u52a0WHERE\u4f1a\u66f4\u65b0\u5168\u8868\u3002<\/li>\n<li>\u5220\u9664&#xff1a;DELETE FROM \u8868 WHERE\u6761\u4ef6&#xff0c;\u4e0d\u52a0WHERE\u6e05\u7a7a\u6574\u5f20\u8868\u6570\u636e\u3002<\/li>\n<\/ul>\n<\/li>\n<h3>6. \u7528\u6237\u4e0e\u6743\u9650\u7ba1\u7406<\/h3>\n<li>\u7528\u6237\u683c\u5f0f&#xff1a;&#039;\u7528\u6237\u540d&#039;&#064;&#039;\u767b\u5f55\u4e3b\u673a&#039;&#xff1b;\u4e3b\u673a\u652f\u6301localhost\u3001IP\u3001\u7f51\u6bb5\u901a\u914d\u7b26%\u3002<\/li>\n<li>\u5e38\u7528\u547d\u4ee4\n<ul>\n<li>\u521b\u5efa\u7528\u6237&#xff1a;CREATE USER &#039;user&#039;&#064;&#039;host&#039; IDENTIFIED BY &#039;\u5bc6\u7801&#039;;<\/li>\n<li>\u5220\u9664\u7528\u6237&#xff1a;DROP USER &#039;user&#039;&#064;&#039;host&#039;;<\/li>\n<li>\u6388\u6743&#xff1a;GRANT \u6743\u9650 ON \u8303\u56f4 TO \u7528\u6237&#064;\u4e3b\u673a&#xff1b;\u8303\u56f4&#xff1a;*.*\u5168\u5c40\u3001\u5e93.*\u5e93\u7ea7\u522b\u3001\u5e93.\u8868\u8868\u7ea7\u522b&#xff0c;\u8fd8\u652f\u6301\u5217\u7ea7\u6743\u9650\u3002<\/li>\n<li>\u56de\u6536\u6743\u9650&#xff1a;REVOKE \u6743\u9650 ON \u8303\u56f4 FROM \u7528\u6237&#064;\u4e3b\u673a;<\/li>\n<li>\u67e5\u770b\u6743\u9650&#xff1a;SHOW GRANTS FOR &#039;user&#039;&#064;&#039;host&#039;;<\/li>\n<li>\u4fee\u6539\u5bc6\u7801&#xff1a;SET PASSWORD FOR &#039;user&#039;&#064;&#039;host&#039; &#061; PASSWORD(&#039;\u65b0\u5bc6\u7801&#039;);<\/li>\n<li>\u6388\u6743\u56de\u6536\u4e4b\u540e\u6267\u884c FLUSH PRIVILEGES;\u5237\u65b0\u6743\u9650\u751f\u6548\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u6743\u9650\u5206\u7c7b&#xff1a;\u5168\u5c40\u6743\u9650\u3001\u6570\u636e\u5e93\u6743\u9650\u3001\u6570\u636e\u8868\u6743\u9650\u3001\u5217\u7c92\u5ea6\u6743\u9650&#xff1b;\u9075\u5faa\u6700\u5c0f\u6743\u9650\u539f\u5219\u3002<\/li>\n<h3>7. \u6545\u969c\u5904\u7406<\/h3>\n<h4>\u2460 root\u5bc6\u7801\u5fd8\u8bb0<\/h4>\n<li>\u4fee\u6539\/etc\/my.cnf.d\/server.cnf\u7684[mysqld]\u6bb5\u6dfb\u52a0skip\u2011grant\u2011tables&#061;1&#xff0c;\u8df3\u8fc7\u6743\u9650\u6821\u9a8c\u3002<\/li>\n<li>\u91cd\u542fmariadb&#xff0c;\u65e0\u5bc6\u7801\u767b\u5f55\u4fee\u6539mysql.user\u8868root\u5bc6\u7801\u3002<\/li>\n<li>\u6ce8\u91ca\u6389skip\u2011grant\u2011tables&#xff0c;\u518d\u6b21\u91cd\u542f\u6570\u636e\u5e93\u6062\u590d\u6743\u9650\u6821\u9a8c\u3002<\/li>\n<h4>\u2461 root\u6743\u9650\u88ab\u8bef\u56de\u6536 \/ root\u8d26\u53f7\u88ab\u8bef\u5220\u9664<\/h4>\n<p>\u540c\u6837\u501f\u52a9skip\u2011grant\u2011tables\u8df3\u8fc7\u6743\u9650&#xff0c;\u4fee\u6539mysql.user\u7cfb\u7edf\u8868&#xff0c;\u6062\u590d\u6743\u9650\u6216\u8005\u91cd\u5efaroot\u8d26\u53f7&#xff0c;\u4e4b\u540e\u6ce8\u91ca\u53c2\u6570\u91cd\u542f\u670d\u52a1\u3002<\/p>\n<h3>8. \u5907\u4efd\u4e0e\u6062\u590d<\/h3>\n<h4>\u7269\u7406\u5907\u4efd&#xff08;\u76f4\u63a5\u62f7\u8d1d\u6570\u636e\u76ee\u5f55&#xff09;<\/h4>\n<ul>\n<li>\u5907\u4efd&#xff1a;\u505c\u6b62mariadb&#xff0c;\u62f7\u8d1d\/var\/lib\/mysql\u76ee\u5f55\u3002<\/li>\n<li>\u6062\u590d&#xff1a;\u62f7\u8d1d\u56de\u539f\u8def\u5f84&#xff0c;\u5fc5\u987b\u4fee\u6539\u5c5e\u4e3b\u4e3amysql:mysql&#xff0c;\u542f\u52a8\u670d\u52a1\u3002<\/li>\n<\/ul>\n<h4>\u903b\u8f91\u5907\u4efd&#xff08;mysqldump&#xff0c;SQL\u8bed\u53e5\u5bfc\u51fa&#xff09;<\/h4>\n<li>\u5907\u4efd<\/li>\n<p><span class=\"token comment\">#\u5355\u5e93&#xff08;\u4e0d\u5305\u542b\u5efa\u5e93\u8bed\u53e5&#xff09;<\/span><br \/>\nmysqldump <span class=\"token parameter variable\">-u<\/span> root <span class=\"token parameter variable\">-p<\/span> \u5e93\u540d <span class=\"token operator\">&gt;<\/span> xxx.sql<br \/>\n<span class=\"token comment\">#\u5e26\u5efa\u5e93\u8bed\u53e5<\/span><br \/>\nmysqldump <span class=\"token parameter variable\">-u<\/span> root <span class=\"token parameter variable\">-p<\/span> <span class=\"token parameter variable\">&#8211;databases<\/span> \u5e93\u540d <span class=\"token operator\">&gt;<\/span> xxx.sql<br \/>\n<span class=\"token comment\">#\u5168\u90e8\u5e93<\/span><br \/>\nmysqldump <span class=\"token parameter variable\">-u<\/span> root <span class=\"token parameter variable\">-p<\/span> &#8211;all\u2011databases <span class=\"token operator\">&gt;<\/span> all.sql<\/p>\n<li>\u6062\u590d\u4e24\u79cd\u65b9\u5f0f<\/li>\n<p>mysql <span class=\"token parameter variable\">-u<\/span> root <span class=\"token parameter variable\">-p<\/span> <span class=\"token operator\">&lt;<\/span> xxx.sql<br \/>\n<span class=\"token comment\">#\u8fdb\u5165\u6570\u636e\u5e93\u5185\u90e8\u6267\u884c<\/span><br \/>\n<span class=\"token builtin class-name\">source<\/span> xxx.sql<\/p>\n<h3>9. MariaDB\u4e3b\u4ece\u5f02\u6b65\u590d\u5236<\/h3>\n<p>\u5f02\u6b65\u590d\u5236&#xff1a;\u4e3b\u5e93\u6267\u884c\u5199\u64cd\u4f5c\u7acb\u523b\u8fd4\u56de\u5ba2\u6237\u7aef&#xff0c;\u4e0d\u9700\u8981\u7b49\u5f85\u4ece\u5e93\u540c\u6b65\u5b8c\u6210\u3002<\/p>\n<li>\u5de5\u4f5c\u6d41\u7a0b\n<ul>\n<li>Master\u4e3b\u5e93&#xff1a;\u5199\u6570\u636e&#xff0c;\u53d8\u66f4\u8bb0\u5f55\u5230binlog\u4e8c\u8fdb\u5236\u65e5\u5fd7\u3002<\/li>\n<li>Slave\u4ece\u5e93&#xff1a;IO\u7ebf\u7a0b\u62c9\u53d6\u4e3b\u5e93binlog&#xff0c;\u5199\u5165\u672c\u5730relay\u2011log\u4e2d\u7ee7\u65e5\u5fd7&#xff1b;SQL\u7ebf\u7a0b\u56de\u653e\u4e2d\u7ee7\u65e5\u5fd7SQL&#xff0c;\u5b9e\u73b0\u6570\u636e\u540c\u6b65\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u914d\u7f6e\u8981\u70b9\n<ul>\n<li>server\u2011id\u5168\u5c40\u552f\u4e00&#xff1a;\u4e3b\u5e93\u4e00\u822c1&#xff0c;\u4ece\u5e932&#xff0c;\u4e0d\u80fd\u91cd\u590d&#xff1b;\u5f00\u542flog_bin\u4e8c\u8fdb\u5236\u65e5\u5fd7&#xff1b;binlog\u683c\u5f0f\u63a8\u8350ROW\u884c\u7ea7\u590d\u5236\u3002<\/li>\n<li>\u4e3b\u5e93&#xff1a;\u521b\u5efa\u4e13\u95e8\u590d\u5236\u8d26\u53f7repl&#xff0c;\u6388\u4e88REPLICATION SLAVE\u3001REPLICATION CLIENT\u6743\u9650&#xff1b;show master status\\\\G\u62ff\u5230binlog\u6587\u4ef6\u540d\u548cposition\u504f\u79fb\u91cf\u3002<\/li>\n<li>\u4ece\u5e93&#xff1a;change master to\u586b\u5199\u4e3b\u5e93IP\u3001\u590d\u5236\u8d26\u53f7\u5bc6\u7801\u3001binlog\u6587\u4ef6\u3001position&#xff1b;\u6267\u884cstart slave\u542f\u52a8\u540c\u6b65\u3002<\/li>\n<li>\u6821\u9a8c&#xff1a;show slave status\\\\G&#xff0c;Slave_IO_Running:Yes\u3001Slave_SQL_Running:Yes\u4ee3\u8868\u540c\u6b65\u6b63\u5e38\u3002<\/li>\n<\/ul>\n<\/li>\n<p>\u6613\u9519\u63d0\u793a&#xff1a;<\/p>\n<li>SQL\u8bed\u53e5\u672b\u5c3e\u5fc5\u987b\u5e26;&#xff0c;\u6f0f\u5206\u53f7\u8fdb\u5165-&gt;\u591a\u884c\u7b49\u5f85\u63d0\u793a\u7b26&#xff0c;\u8f93\u5165\\\\c\u653e\u5f03\u5f53\u524dSQL&#xff1b;\\\\q\u624d\u662f\u9000\u51fa\u5ba2\u6237\u7aef\u3002<\/li>\n<li>UPDATE\u3001DELETE\u4e00\u5b9a\u8981\u5199WHERE\u6761\u4ef6&#xff0c;\u5426\u5219\u5168\u8868\u6570\u636e\u906d\u6b83\u3002<\/li>\n<li>\u4e3b\u4ece\u590d\u5236server\u2011id\u4e0d\u80fd\u91cd\u590d&#xff0c;binlog\u7684File\u548cPosition\u5fc5\u987b\u548c\u4e3b\u5e93\u4fdd\u6301\u4e00\u81f4\u3002<\/li>\n<li>mysqldump\u903b\u8f91\u5907\u4efd\u8d26\u53f7\u81f3\u5c11\u9700\u8981select\u6743\u9650&#xff0c;\u89c6\u56fe\u9700\u8981show view\u6743\u9650<\/li>\n","protected":false},"excerpt":{"rendered":"<p>MariaDB\u77e5\u8bc6\u70b9\u603b\u7ed3MariaDB\u662fMySQL\u7684\u5206\u652f&#xff0c;CentOS7\u9ed8\u8ba4\u6570\u636e\u5e93&#xff0c;\u7aef\u53e33306&#xff0c;\u6838\u5fc3\u5305\u542b\u8fdb\u7a0b\u3001\u5b89\u88c5\u52a0\u56fa\u3001\u914d\u7f6e\u6587\u4ef6\u3001\u5e93\u8868SQL\u64cd\u4f5c\u3001\u7528\u6237\u6743\u9650\u3001\u5bc6\u7801\u6545\u969c\u5904\u7406\u3001\u5907\u4efd\u6062\u590d\u3001\u4e3b\u4ece\u590d\u5236\u30021. \u53cc\u8fdb\u7a0b\u6a21\u578b<br \/>\nmysqld_safe&#xff1a;\u5b88\u62a4\u76d1\u63a7\u8fdb\u7a0b&#xff1a;\u542f\u52a8\u3001\u76d1\u63a7mysqld&#xff0c;\u4e3b\u8fdb\u7a0b\u5d29\u6e83\u81ea\u52a8\u91cd\u542f&#xff1b;\u7ba1\u7406\u9519\u8bef\u65e5\u5fd7\u4e0e\u542f\u52a8\u53c2\u6570\u3002mysqld&#xff1a;\u6570\u636e\u5e93\u6838\u5fc3\u4e3b\u8fdb\u7a0b&#xff1a;\u76d1\u542c3<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,937,44],"topic":[],"class_list":["post-112603","post","type-post","status-publish","format-standard","hentry","category-server","tag-linux","tag-mariadb","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linux\u8fd0\u7ef4\uff1aMariaDB\u77e5\u8bc6\u70b9\u603b\u7ed3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/112603.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux\u8fd0\u7ef4\uff1aMariaDB\u77e5\u8bc6\u70b9\u603b\u7ed3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"MariaDB\u77e5\u8bc6\u70b9\u603b\u7ed3MariaDB\u662fMySQL\u7684\u5206\u652f&#xff0c;CentOS7\u9ed8\u8ba4\u6570\u636e\u5e93&#xff0c;\u7aef\u53e33306&#xff0c;\u6838\u5fc3\u5305\u542b\u8fdb\u7a0b\u3001\u5b89\u88c5\u52a0\u56fa\u3001\u914d\u7f6e\u6587\u4ef6\u3001\u5e93\u8868SQL\u64cd\u4f5c\u3001\u7528\u6237\u6743\u9650\u3001\u5bc6\u7801\u6545\u969c\u5904\u7406\u3001\u5907\u4efd\u6062\u590d\u3001\u4e3b\u4ece\u590d\u5236\u30021. \u53cc\u8fdb\u7a0b\u6a21\u578b mysqld_safe&#xff1a;\u5b88\u62a4\u76d1\u63a7\u8fdb\u7a0b&#xff1a;\u542f\u52a8\u3001\u76d1\u63a7mysqld&#xff0c;\u4e3b\u8fdb\u7a0b\u5d29\u6e83\u81ea\u52a8\u91cd\u542f&#xff1b;\u7ba1\u7406\u9519\u8bef\u65e5\u5fd7\u4e0e\u542f\u52a8\u53c2\u6570\u3002mysqld&#xff1a;\u6570\u636e\u5e93\u6838\u5fc3\u4e3b\u8fdb\u7a0b&#xff1a;\u76d1\u542c3\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/112603.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-03T23:16:58+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/112603.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/112603.html\",\"name\":\"Linux\u8fd0\u7ef4\uff1aMariaDB\u77e5\u8bc6\u70b9\u603b\u7ed3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-03T23:16:58+00:00\",\"dateModified\":\"2026-10-03T23:16:58+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/112603.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/112603.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/112603.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux\u8fd0\u7ef4\uff1aMariaDB\u77e5\u8bc6\u70b9\u603b\u7ed3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linux\u8fd0\u7ef4\uff1aMariaDB\u77e5\u8bc6\u70b9\u603b\u7ed3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/112603.html","og_locale":"zh_CN","og_type":"article","og_title":"Linux\u8fd0\u7ef4\uff1aMariaDB\u77e5\u8bc6\u70b9\u603b\u7ed3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"MariaDB\u77e5\u8bc6\u70b9\u603b\u7ed3MariaDB\u662fMySQL\u7684\u5206\u652f&#xff0c;CentOS7\u9ed8\u8ba4\u6570\u636e\u5e93&#xff0c;\u7aef\u53e33306&#xff0c;\u6838\u5fc3\u5305\u542b\u8fdb\u7a0b\u3001\u5b89\u88c5\u52a0\u56fa\u3001\u914d\u7f6e\u6587\u4ef6\u3001\u5e93\u8868SQL\u64cd\u4f5c\u3001\u7528\u6237\u6743\u9650\u3001\u5bc6\u7801\u6545\u969c\u5904\u7406\u3001\u5907\u4efd\u6062\u590d\u3001\u4e3b\u4ece\u590d\u5236\u30021. \u53cc\u8fdb\u7a0b\u6a21\u578b mysqld_safe&#xff1a;\u5b88\u62a4\u76d1\u63a7\u8fdb\u7a0b&#xff1a;\u542f\u52a8\u3001\u76d1\u63a7mysqld&#xff0c;\u4e3b\u8fdb\u7a0b\u5d29\u6e83\u81ea\u52a8\u91cd\u542f&#xff1b;\u7ba1\u7406\u9519\u8bef\u65e5\u5fd7\u4e0e\u542f\u52a8\u53c2\u6570\u3002mysqld&#xff1a;\u6570\u636e\u5e93\u6838\u5fc3\u4e3b\u8fdb\u7a0b&#xff1a;\u76d1\u542c3","og_url":"https:\/\/www.wsisp.com\/helps\/112603.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-03T23:16:58+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/112603.html","url":"https:\/\/www.wsisp.com\/helps\/112603.html","name":"Linux\u8fd0\u7ef4\uff1aMariaDB\u77e5\u8bc6\u70b9\u603b\u7ed3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-03T23:16:58+00:00","dateModified":"2026-10-03T23:16:58+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/112603.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/112603.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/112603.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Linux\u8fd0\u7ef4\uff1aMariaDB\u77e5\u8bc6\u70b9\u603b\u7ed3"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/112603","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=112603"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/112603\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=112603"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=112603"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=112603"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=112603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}