{"id":977,"date":"2016-09-08T13:20:51","date_gmt":"2016-09-08T04:20:51","guid":{"rendered":"http:\/\/usg.mydns.jp\/?p=977"},"modified":"2016-09-23T08:21:38","modified_gmt":"2016-09-22T23:21:38","slug":"%e8%b6%85%e7%b0%a1%e6%98%93%e7%9a%84%e3%80%80mariadb%e3%80%80%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%a8%e8%a8%ad%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/usg.mydns.jp\/?p=977","title":{"rendered":"\u8d85\u7c21\u6613\u7684\u3000MariaDB\u3000\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u8a2d\u5b9a"},"content":{"rendered":"<p>\u8d85\u7c21\u6613\u7684\u306aMariaDB\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30fb\u8a2d\u5b9a\u306a\u3069\u3001<br \/>\n\u81ea\u5206\u306a\u308a\u306e\u30e1\u30e2\u3067\u3059\u3002<\/p>\n<p>CentOS7.2\u306e\u5834\u5408<\/p>\n<p>\u25cf\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<table border=\"0\" bgcolor=\"#e0e0e0\" width=\"100%\" style=\"font-family: Arial, Helvetica, sans-serif; font-size: 14px; border-width: 1px; border-style: solid; border-color: #303030;\">\n<tr>\n<td><PRE style=\"font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 125%;\"><br \/>\n# yum -y install mariadb mariadb-server php-mysqlnd<br \/>\n<\/PRE><\/td>\n<\/tr>\n<\/table>\n<p>\u25cf\u81ea\u52d5\u8d77\u52d5\u306a\u3069\u306e\u8a2d\u5b9a<\/p>\n<table border=\"0\" bgcolor=\"#e0e0e0\" width=\"100%\" style=\"font-family: Arial, Helvetica, sans-serif; font-size: 14px; border-width: 1px; border-style: solid; border-color: #303030;\">\n<tr>\n<td><PRE style=\"font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 125%;\"><br \/>\n# systemctl enable mariadb<br \/>\n# systemctl start mariadb<br \/>\n# systemctl status mariadb<br \/>\n<\/PRE><\/td>\n<\/tr>\n<\/table>\n<p>\u25cfmariadb\u521d\u671f\u8a2d\u5b9a<br \/>\n\u30fbmariadb\u306eroot\u30d1\u30b9\u30ef\u30fc\u30c9\u8a2d\u5b9a<\/p>\n<table border=\"0\" bgcolor=\"#e0e0e0\" width=\"100%\" style=\"font-family: Arial, Helvetica, sans-serif; font-size: 14px; border-width: 1px; border-style: solid; border-color: #303030;\">\n<tr>\n<td><PRE style=\"font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 125%;\"><br \/>\n# \/usr\/bin\/mysqladmin -u root password &#8216;mariadb\u306eroot\u30d1\u30b9\u30ef\u30fc\u30c9&#8217;<br \/>\n<\/PRE><\/td>\n<\/tr>\n<\/table>\n<p>\u30fbmariadb\u3000root\u30ed\u30b0\u30a4\u30f3\u78ba\u8a8d<\/p>\n<table border=\"0\" bgcolor=\"#e0e0e0\" width=\"100%\" style=\"font-family: Arial, Helvetica, sans-serif; font-size: 14px; border-width: 1px; border-style: solid; border-color: #303030;\">\n<tr>\n<td><PRE style=\"font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 125%;\"><br \/>\n# mysql -u root -p<br \/>\n<\/PRE><\/td>\n<\/tr>\n<\/table>\n<p>\u30fb\u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9\u540d\u30fb\u30e6\u30fc\u30b6\u30fc\u540d\u30fb\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u8a2d\u5b9a<br \/>\n\u4f8b\uff1a<br \/>\n\u3000\u3000\u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9\u540d\taaa_db<br \/>\n\u3000\u3000\u30e6\u30fc\u30b6\u30fc\u540d\t\tbbb<br \/>\n\u3000\u3000\u30d1\u30b9\u30ef\u30fc\u30c9\t\t1234<\/p>\n<table border=\"0\" bgcolor=\"#e0e0e0\" width=\"100%\" style=\"font-family: Arial, Helvetica, sans-serif; font-size: 14px; border-width: 1px; border-style: solid; border-color: #303030;\">\n<tr>\n<td><PRE style=\"font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 125%;\"><br \/>\nMariaDB [(none)]> DROP DATABASE `aaa_db`;<br \/>\nMariaDB [(none)]> DELETE FROM mysql.user WHERE user=&#8217;bbb&#8217;;<br \/>\nMariaDB [(none)]> FLUSH PRIVILEGES;<\/p>\n<p>MariaDB [(none)]> CREATE DATABASE `aaa_db` DEFAULT CHARACTER SET utf8;<\/p>\n<p>MariaDB [(none)]> GRANT ALL ON aaa_db.* to bbb@localhost identified by &#8216;1234&#8217;;<br \/>\nMariaDB [(none)]> FLUSH PRIVILEGES;<br \/>\nMariaDB [(none)]> EXIT<\/PRE><\/td>\n<\/tr>\n<\/table>\n<p>\u30fb\u767b\u9332\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u540d\u3067\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u308b\u304b\u78ba\u8a8d<\/p>\n<table border=\"0\" bgcolor=\"#e0e0e0\" width=\"100%\" style=\"font-family: Arial, Helvetica, sans-serif; font-size: 14px; border-width: 1px; border-style: solid; border-color: #303030;\">\n<tr>\n<td><PRE style=\"font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 125%;\"><br \/>\n# mysql -u bbb -p<br \/>\n<\/PRE><\/td>\n<\/tr>\n<\/table>\n<p>\u30fb\u305d\u306e\u30e6\u30fc\u30b6\u30fc\u540d\u3067\u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9\u304c\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u304b\u78ba\u8a8d<\/p>\n<table border=\"0\" bgcolor=\"#e0e0e0\" width=\"100%\" style=\"font-family: Arial, Helvetica, sans-serif; font-size: 14px; border-width: 1px; border-style: solid; border-color: #303030;\">\n<tr>\n<td><PRE style=\"font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 125%;\"><br \/>\nMariaDB [(none)]>SHOW DATABASES;<br \/>\n<\/PRE><\/td>\n<\/tr>\n<\/table>\n<p>\u30fbMariaDB\u7d42\u308f\u308a<\/p>\n<table border=\"0\" bgcolor=\"#e0e0e0\" width=\"100%\" style=\"font-family: Arial, Helvetica, sans-serif; font-size: 14px; border-width: 1px; border-style: solid; border-color: #303030;\">\n<tr>\n<td><PRE style=\"font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 125%;\"><br \/>\nMariaDB [(none)]> EXIT<br \/>\n<\/PRE><\/td>\n<\/tr>\n<\/table>\n<p>\u304a\u3057\u307e\u3044<\/p>\n<p><a href=\"http:\/\/px.a8.net\/svt\/ejp?a8mat=2NIH7W+AGVFH6+50+4YOECX\" target=\"_blank\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" border=\"0\" width=\"728\" height=\"90\" alt=\"\" src=\"http:\/\/www25.a8.net\/svt\/bgt?aid=160425644633&#038;wid=002&#038;eno=01&#038;mid=s00000000018030011000&#038;mc=1\"><\/a><br \/>\n<img loading=\"lazy\" decoding=\"async\" border=\"0\" width=\"1\" height=\"1\" src=\"http:\/\/www12.a8.net\/0.gif?a8mat=2NIH7W+AGVFH6+50+4YOECX\" alt=\"\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8d85\u7c21\u6613\u7684\u306aMariaDB\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30fb\u8a2d\u5b9a\u306a\u3069\u3001 \u81ea\u5206\u306a\u308a\u306e\u30e1\u30e2\u3067\u3059\u3002 Cen &hellip; <a href=\"https:\/\/usg.mydns.jp\/?p=977\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"gallery","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-977","post","type-post","status-publish","format-gallery","hentry","category-linux","post_format-post-format-gallery"],"_links":{"self":[{"href":"https:\/\/usg.mydns.jp\/index.php?rest_route=\/wp\/v2\/posts\/977","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/usg.mydns.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/usg.mydns.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/usg.mydns.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/usg.mydns.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=977"}],"version-history":[{"count":24,"href":"https:\/\/usg.mydns.jp\/index.php?rest_route=\/wp\/v2\/posts\/977\/revisions"}],"predecessor-version":[{"id":1051,"href":"https:\/\/usg.mydns.jp\/index.php?rest_route=\/wp\/v2\/posts\/977\/revisions\/1051"}],"wp:attachment":[{"href":"https:\/\/usg.mydns.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=977"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/usg.mydns.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=977"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/usg.mydns.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=977"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}