{"id":408,"date":"2017-08-31T12:31:20","date_gmt":"2017-08-31T03:31:20","guid":{"rendered":"http:\/\/daily-memorials.net\/?p=408"},"modified":"2017-09-03T20:04:08","modified_gmt":"2017-09-03T11:04:08","slug":"sql%e8%a8%80%e8%aa%9e%e3%83%a1%e3%83%a2","status":"publish","type":"post","link":"http:\/\/daily-memorials.net\/?p=408","title":{"rendered":"SQL\u8a00\u8a9e\u30e1\u30e2"},"content":{"rendered":"<div id=\"toc_container\" class=\"no_bullets\"><p class=\"toc_title\">Contents<\/p><ul class=\"toc_list\"><li><a href=\"#MYSQL\"><span class=\"toc_number toc_depth_1\">1<\/span> MYSQL\u8d77\u52d5\u3001\u7d42\u4e86<\/a><\/li><li><a href=\"#SQL\"><span class=\"toc_number toc_depth_1\">2<\/span> \u983b\u51fa\u306eSQL\u30b3\u30de\u30f3\u30c9<\/a><ul><li><a href=\"#i\"><span class=\"toc_number toc_depth_2\">2.1<\/span> \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30ea\u30b9\u30c8\u306e\u8868\u793a<\/a><\/li><li><a href=\"#i-2\"><span class=\"toc_number toc_depth_2\">2.2<\/span> \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3078\u306e\u79fb\u52d5<\/a><\/li><li><a href=\"#i-3\"><span class=\"toc_number toc_depth_2\">2.3<\/span> \u30c6\u30fc\u30d6\u30eb\u30ea\u30b9\u30c8\u306e\u8868\u793a<\/a><\/li><li><a href=\"#i-4\"><span class=\"toc_number toc_depth_2\">2.4<\/span> \u30c6\u30fc\u30d6\u30eb\u306e\u4f5c\u6210<\/a><\/li><li><a href=\"#i-5\"><span class=\"toc_number toc_depth_2\">2.5<\/span> \u30e6\u30fc\u30b6\u306e\u8ffd\u52a0<\/a><\/li><li><a href=\"#i-6\"><span class=\"toc_number toc_depth_2\">2.6<\/span> \u30e6\u30fc\u30b6\u3078\u306e\u6a29\u9650\u4ed8\u4e0e<\/a><\/li><\/ul><\/li><\/ul><\/div>\n<h2><span id=\"MYSQL\">MYSQL\u8d77\u52d5\u3001\u7d42\u4e86<\/span><\/h2>\n<p>\u30fb\u8d77\u52d5\u3001\u7d42\u4e86<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\n\/\/\u8d77\u52d5\r\nmysql -u user_name\r\n\/\/\u7d42\u4e86\r\nquit\r\n<\/pre>\n<h2><span id=\"SQL\">\u983b\u51fa\u306eSQL\u30b3\u30de\u30f3\u30c9<\/span><\/h2>\n<h3><span id=\"i\">\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30ea\u30b9\u30c8\u306e\u8868\u793a<\/span><\/h3>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\nshow databases\r\n<\/pre>\n<h3><span id=\"i-2\">\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3078\u306e\u79fb\u52d5<\/span><\/h3>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\nuse &quot;\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u540d\u524d&quot;\r\n<\/pre>\n<h3><span id=\"i-3\">\u30c6\u30fc\u30d6\u30eb\u30ea\u30b9\u30c8\u306e\u8868\u793a<\/span><\/h3>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\nshow tables\r\n<\/pre>\n<h3><span id=\"i-4\">\u30c6\u30fc\u30d6\u30eb\u306e\u4f5c\u6210<\/span><\/h3>\n<p>create &#8220;\u30c6\u30fc\u30d6\u30eb\u306e\u540d\u524d&#8221; (\u30d5\u30a3\u30fc\u30eb\u30c9\u540d \u30c7\u30fc\u30bf\u578b,\u30fb\u30fb);<br \/>\n\u4f8b<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\ncreate  name_ID_list (id int,name varchar(20));\r\n<\/pre>\n<h3><span id=\"i-5\">\u30e6\u30fc\u30b6\u306e\u8ffd\u52a0<\/span><\/h3>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\nCREATE USER '\u30e6\u30fc\u30b6\u540d'@'\u30db\u30b9\u30c8\u540d' IDENTIFIED BY '\u30d1\u30b9\u30ef\u30fc\u30c9';\r\n<\/pre>\n<h3><span id=\"i-6\">\u30e6\u30fc\u30b6\u3078\u306e\u6a29\u9650\u4ed8\u4e0e<\/span><\/h3>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\nGRANT '\u6a29\u9650' ON 'db_name'.'table_name' TO 'user';\r\n<\/pre>\n<\/h3>\n","protected":false},"excerpt":{"rendered":"<p>Contents1 MYSQL\u8d77\u52d5\u3001\u7d42\u4e862 \u983b\u51fa\u306eSQL\u30b3\u30de\u30f3\u30c92.1 \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30ea\u30b9\u30c8\u306e\u8868\u793a2.2 \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3078\u306e\u79fb\u52d52.3 \u30c6\u30fc\u30d6\u30eb\u30ea\u30b9\u30c8\u306e\u8868\u793a2.4 \u30c6\u30fc\u30d6\u30eb\u306e\u4f5c\u62102.5 \u30e6\u30fc\u30b6\u306e\u8ffd\u52a02.6 \u30e6\u30fc\u30b6\u3078\u306e\u6a29\u9650\u4ed8\u4e0e &hellip; <a href=\"http:\/\/daily-memorials.net\/?p=408\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;SQL\u8a00\u8a9e\u30e1\u30e2&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"http:\/\/daily-memorials.net\/index.php?rest_route=\/wp\/v2\/posts\/408"}],"collection":[{"href":"http:\/\/daily-memorials.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/daily-memorials.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/daily-memorials.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/daily-memorials.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=408"}],"version-history":[{"count":7,"href":"http:\/\/daily-memorials.net\/index.php?rest_route=\/wp\/v2\/posts\/408\/revisions"}],"predecessor-version":[{"id":432,"href":"http:\/\/daily-memorials.net\/index.php?rest_route=\/wp\/v2\/posts\/408\/revisions\/432"}],"wp:attachment":[{"href":"http:\/\/daily-memorials.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/daily-memorials.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=408"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/daily-memorials.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}