{"id":1506,"date":"2021-01-14T11:05:13","date_gmt":"2021-01-14T03:05:13","guid":{"rendered":"http:\/\/cnliutz.uicp.io\/?p=1506"},"modified":"2021-01-14T11:05:13","modified_gmt":"2021-01-14T03:05:13","slug":"centos8-%e5%ae%89%e8%a3%85-mariadb-%e6%9c%80%e6%96%b0%e7%89%88-10-5-x","status":"publish","type":"post","link":"http:\/\/g1n29wqq.ipyingshe.net:5347\/?p=1506","title":{"rendered":"Centos8 \u5b89\u88c5 mariadb \u6700\u65b0\u7248 10.5.x"},"content":{"rendered":"\n<p>\u901a\u8fc7\u5b98\u7f51\u67e5\u770b<br>https:\/\/mariadb.org\/<br>\u6216<br>https:\/\/yum.mariadb.org\/<\/p>\n\n\n\n<p>\u6700\u65b0\u7248\u4e3a 10.5.x<br>fox.\u98ce<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u8bbe\u7f6e\u6570\u636e\u6e90<\/h1>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/mariadb.com\/kb\/en\/yum\/\n<\/div><\/figure>\n\n\n\n<p>\u8fd9\u91cc\u4f7f\u7528\u7684\u662f\u56fd\u5185\u6e90 <code>http:\/\/mirrors.aliyun.com\/mariadb\/yum\/10.5\/centos8-amd64\/<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat &lt;&lt;EOF &gt; \/etc\/yum.repos.d\/mariadb.repo\n&#91;mariadb]\nname = mariadb\nbaseurl=http:\/\/mirrors.aliyun.com\/mariadb\/yum\/10.5\/centos8-amd64\/\ngpgkey=https:\/\/mirrors.aliyun.com\/mariadb\/yum\/RPM-GPG-KEY-MariaDB \n#enabled=1\ngpgcheck=1\nEOF\n<\/code><\/pre>\n\n\n\n<p>\u590d\u5236\u5230 \u7ec8\u7aef\u76f4\u63a5\u6267\u884c<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u66f4\u65b0\u7f13\u5b58<\/h1>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf clean all  \ndnf makecache  \ndnf repolist\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u663e\u793a\u53ef\u5b89\u88c5\u7684\u7248\u672c<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># \u8fd9\u4e2a\u53ef\u4ee5\u770b\u7248\u672c\u53f7\ndnf search mariadb --showduplicates  --disablerepo=AppStream\n\u6216\ndnf search mariadb\n<\/code><\/pre>\n\n\n\n<p><code>--disablerepo=AppStream<\/code> \u7981\u7528\u4ed3\u5e93\u6807\u8bc6\u4e3a AppStream \u7684\u4e3b\u8f6f\u4ef6\u4ed3\u5e93<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u5b89\u88c5<\/h1>\n\n\n\n<p>\u73b0\u5728\u5b89\u88c5\u7684\u5c31\u662f \u6700\u65b0\u7684\u7248\u672c\u4e86<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf -y install MariaDB-server MariaDB-client  --disablerepo=AppStream\n<\/code><\/pre>\n\n\n\n<p><code>--disablerepo=AppStream<\/code> \u7981\u7528\u4ed3\u5e93\u6807\u8bc6\u4e3a AppStream \u7684\u4e3b\u8f6f\u4ef6\u4ed3\u5e93<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u547d\u4ee4<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">\u8bbe\u7f6e\u5bc6\u7801<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql_secure_installation\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl enable mariadb --now\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u542f\u52a8 mariadb<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl start mariadb\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u521b\u5efa\u65b0\u8d85\u7ea7\u7ba1\u7406\u7528\u6237 fox<\/h2>\n\n\n\n<p>\u5728 shell \u4e2d\u8f93\u5165<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -uroot -p\n#\u8f93\u5165 root \u7684 \u7ba1\u7406\u5bc6\u7801\n<\/code><\/pre>\n\n\n\n<p>\u4e0b\u9762 \u6bcf\u6b21\u6267\u884c\u4e00\u6761<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>use mysql;\n\n#\u521b\u5efa\u7528\u6237 \u5e76\u8bbe\u7f6e\u5bc6\u7801\ncreate user 'fox'@'%' identified by '123456';\n\n\n#\u6388\u6743 fox  \u62e5\u6709 \u6240\u6709\u6743\u9650\ngrant all privileges   on *.* to 'fox'@'%' identified by '123456'  WITH GRANT OPTION; \n\n# \u5237\u65b0\u6743\u9650\nflush privileges;\n\n#\u9000\u51fa\nexit;\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5141\u8bb8 root \u8fdc\u7a0b\u767b\u5f55<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;\nflush privileges;\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u901a\u8fc7\u5b98\u7f51\u67e5\u770bhttps:\/\/mariadb.org\/\u6216https:\/\/yum.m <span class=\"readmore\"><a href=\"http:\/\/g1n29wqq.ipyingshe.net:5347\/?p=1506\">Continue Reading<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-1506","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/posts\/1506","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1506"}],"version-history":[{"count":2,"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/posts\/1506\/revisions"}],"predecessor-version":[{"id":1508,"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/posts\/1506\/revisions\/1508"}],"wp:attachment":[{"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1506"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}