{"id":622,"date":"2010-04-05T01:00:00","date_gmt":"2010-04-04T16:00:00","guid":{"rendered":"http:\/\/mio.servequake.com\/wordpress\/?p=622"},"modified":"2010-04-05T01:00:00","modified_gmt":"2010-04-04T16:00:00","slug":"mysql-2","status":"publish","type":"post","link":"http:\/\/mio.servequake.com\/wordpress\/?p=622","title":{"rendered":"MySQL"},"content":{"rendered":"<p>\u52c9\u5f37\u3057\u3088\u3046\u3068\u601d\u3063\u3066\u305a\u3063\u3068\u653e\u7f6e\u3060\u3063\u305f\u3051\u3069\u5c11\u3057\u304b\u3058\u3063\u3066\u307f\u305f\u3002<br \/>\nGentoo\u306b\u3064\u3044\u3066\u306eMySQL\u306e\u899a\u66f8\u3002\u307e\u305a\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304b\u3089\u4f7f\u3044\u51fa\u3059\u524d\u307e\u3067\u3002<br \/>\n\u25cf\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e96\u5099<br \/>\n\u4ed6\u306e\u30c7\u30a3\u30b9\u30c8\u30ea\u3067\u306fmysql\u30e6\u30fc\u30b6\u30fc\u3092\u8ffd\u52a0\u3059\u308b\u304c\u3001Gentoo\u3067\u306femerge\u3067mysql\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u6bb5\u968e\u3067\u30e6\u30fc\u30b6\u30fc\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u7279\u306b\u4e0d\u8981\u3002<br \/>\n\u25cf\u30b3\u30f3\u30d1\u30a4\u30eb\u30aa\u30d7\u30b7\u30e7\u30f3<br \/>\nUSE\u30d5\u30e9\u30b0\u306f\u4e0b\u8a18\u306e\u3082\u306e\u304c\u6307\u5b9a\u53ef\u80fd\u3002\uff085.0.90-r2\u306e\u5834\u5408\uff09<br \/>\n\u30d5\u30e9\u30b0\u306e\u5f8c\u306b\uff08L)\u304c\u3042\u308b\u3082\u306e\u306f\u30ed\u30fc\u30ab\u30eb\u30d5\u30e9\u30b0\u3001\u7121\u3044\u3082\u306e\u306f\u30b0\u30ed\u30fc\u30d0\u30eb\u30d5\u30e9\u30b0\u3002<br \/>\n\u30fbcommunity(L) &#8211; Enables the community features from upstream.<br \/>\n\u30fbperl &#8211; Adds support\/bindings for the Perl language<br \/>\n\u30fbssl &#8211; Adds support for Secure Socket Layer connections<br \/>\n\u30fbberkdb &#8211; Adds support for sys-libs\/db (Berkeley DB for MySQL)<br \/>\n\u30fbbig-tables(L) &#8211; Make tables contain up to 1.844E+19 rows<br \/>\n\u30fbcluster(L) &#8211; Add support for NDB clustering (deprecated)<br \/>\n\u30fbdebug &#8211; Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see http:\/\/www.gentoo.org\/proj\/en\/qa\/backtraces.xml<br \/>\n\u30fbembedded(L) &#8211; Build embedded server (libmysqld)<br \/>\n\u30fbextraengine(L) &#8211; Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)<br \/>\n\u30fblatin1(L) &#8211; Use LATIN1 encoding instead of UTF8<br \/>\n\u30fbmax-idx-128(L) &#8211; Raise the max index per table limit from 64 to 128<br \/>\n\u30fbminimal &#8211; Install a very minimal build (disables, for example, plugins, fonts, most drivers, non-critical features)<br \/>\nminimal(L) &#8211; Install client programs only, no server<br \/>\n\u30fbprofiling(L) &#8211; Add support for statement profiling (requires USE=community)<br \/>\n\u30fbstatic &#8211; !!do not set this during bootstrap!! Causes binaries to be statically linked instead of dynamically<br \/>\n\u30fbtest &#8211; Workaround to pull in packages needed to run with FEATURES=test. Portage-2.1.2 handles this internally, so don&#8217;t set it in make.conf\/package.use anymore<br \/>\ntest(L) &#8211; Install upstream testsuites for end use.<br \/>\n\u3056\u3063\u3068\u898b\u305f\u611f\u3058\u3001configure\u306b\u5f71\u97ff\u3059\u308b\u306e\u306fSSL\u3060\u3051\u304b\u306a\u3002\u3042\u3068\u306f\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3084\u30e9\u30a4\u30d6\u30e9\u30ea\u306a\u3069\u306e\u5229\u7528\u5f62\u614b\u3067\u6c7a\u3081\u308c\u3070\u3044\u3044\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u307e\u307e\u3067\u5341\u5206\u304b\u306a\uff1fberkdb\u3001perl\u304c\u5229\u7528\u72b6\u6cc1\u306b\u3088\u3063\u3066\u6307\u5b9a\u3067\u304d\u308b\u304b\u3069\u3046\u304b\u304f\u3089\u3044\u304b\u3002<br \/>\n\u25cf\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\nemerge mysql\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u308b\u3002\uff08emerge -C mysql\u3067\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff09<br \/>\n\u25cf\u8d77\u52d5\u524d\u306e\u8a2d\u5b9a<br \/>\n\uff11\uff0e\/etc\/mysql\/my.cnf\u3092\u7de8\u96c6\u3059\u308b\u3002\uff08\u5927\u62b5\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u554f\u984c\u306a\u3044\uff09<br \/>\n\uff12\uff0eemerge &#8211;config =mysql-(\u30d0\u30fc\u30b8\u30e7\u30f3) \u3002root\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u8a2d\u5b9a\u3055\u308c\u308b\u3002<br \/>\n\u25cf\u30c7\u30fc\u30e2\u30f3\u306e\u8d77\u52d5<br \/>\n\/etc\/init.d\/mysql start\u3067\u8d77\u52d5\u3001stop\u3067\u505c\u6b62\u3059\u308b\u3002<br \/>\n\u30b7\u30b9\u30c6\u30e0\u8d77\u52d5\u6642\u306b\u81ea\u52d5\u8d77\u52d5\u3055\u305b\u308b\u306a\u3089rc-update\u3067\u8ffd\u52a0\u3057\u3066\u304a\u304f\u3002<br \/>\n\u25cf\u8d77\u52d5\u5f8c\u306e\u8a2d\u5b9a<br \/>\n\uff11\uff0etest\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3001\u533f\u540d\u30e6\u30fc\u30b6\u30fc\u306e\u524a\u9664<br \/>\n\u5fc5\u305a\u3057\u3082\u5fc5\u8981\u3067\u7121\u3044\u304c\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30dd\u30ea\u30b7\u30fc\u3068\u3057\u3066\u4e0d\u7528\u610f\u306b\u4f7f\u308f\u305b\u306a\u3044\u70ba\u306b\u3082\u6d88\u3059\u3002<br \/>\n\u81ea\u5206\u306f\u6d88\u3055\u306a\u304f\u3066\u3082\u3044\u3044\u3084\u3063\u3066\u4eba\u306f\u3084\u3089\u306a\u304f\u3066\u3082\u3044\u3044\u3002<br \/>\n\u533f\u540d\u30e6\u30fc\u30b6\u30fc\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u63a5\u7d9a\u3068\u53c2\u7167\u3057\u304b\u51fa\u6765\u306a\u3044\u306e\u3067\u653e\u7f6e\u3057\u3066\u3082\u5b9f\u5bb3\u306f\u306a\u3055\u305d\u3046\u3002<br \/>\n\uff08\u3067\u3082\u3001\u898b\u3089\u308c\u308b\u3063\u3066\u4e8b\u306f\u4f55\u304b\u3055\u308c\u308b\u30c8\u30ea\u30ac\u30fc\u306b\u306a\u308b\u306e\u3067\u5371\u967a\u3068\u5224\u65ad\u3059\u308b\u304b\u306f\u500b\u4eba\u306e\u81ea\u7531\uff09<br \/>\n\u30fbtest\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u524a\u9664<br \/>\nmysql -u root -p\u3092\u5b9f\u884c\u3057\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u5165\u529b\u3057\u3066\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3092\u8d77\u52d5\u3002<br \/>\nshow databases;\u3067\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4e00\u89a7\u3059\u308b\u3002information_schema\u3068mysql\u4ee5\u5916\u304c\u30e6\u30fc\u30b6\u30fc\u7528\u306a\u306e\u3067<br \/>\n\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u3042\u308btest\u3092\u6d88\u3057\u3066\u304a\u304f\uff08drop database test;\u3067\u6d88\u305b\u308b\uff09\u3002<br \/>\n\u30fb\u533f\u540d\u30e6\u30fc\u30b6\u30fc\u524a\u9664<br \/>\n\u30e6\u30fc\u30b6\u30fc\u60c5\u5831\u306fmysql\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306euser\u30c6\u30fc\u30d6\u30eb\u306b\u3042\u308b\u3002<br \/>\nselect User,host from mysql.user; \u3067\u4e00\u89a7\u3067\u304d\u308b\u3002<br \/>\n\u30e6\u30fc\u30b6\u30fc\u304c\u30b9\u30da\u30fc\u30b9\u306a\u306e\u306f\u533f\u540d\u30e6\u30fc\u30b6\u30fc\u306a\u306e\u3067\u3053\u308c\u3092\u6d88\u3057\u3066\u304a\u304f\u3002<br \/>\ndelete from mysql.user where User=&#8221;;<br \/>\nflush privileges;<br \/>\n\u3053\u308c\u3067mysql\u5358\u4f53\u3067\u5b9f\u884c\u3057\u3066\u3082\u30a8\u30e9\u30fc\u3068\u306a\u308b\u3002\u8d77\u52d5\u306f-u\u3067\u30e6\u30fc\u30b6\u30fc\u3092\u6307\u5b9a\u3059\u308b\u3002<br \/>\n\uff12\uff0e\u30e6\u30fc\u30b6\u30fc\u767b\u9332<br \/>\nmysql -u root -p\u3067\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u63a5\u7d9a\u3059\u308b\u3002<br \/>\ngrant all on *.* to \u30e6\u30fc\u30b6\u30fc@localhost identified by &#8216;\u30d1\u30b9\u30ef\u30fc\u30c9&#8217;;<br \/>\n\u30fball\u306f\u3059\u3079\u3066\u306e\u6a29\u9650\u306a\u306e\u3067\u3001\u500b\u5225\u306b\u6a29\u9650\u3092\u4e0e\u3048\u3066\u5229\u7528\u3092\u9650\u5b9a\u3055\u305b\u308b\u3053\u3068\u3082\u53ef\u80fd\u3002<br \/>\n\u30fb\u6a29\u9650\u306e\u524a\u9664\u306frevoke\u3092\u4f7f\u3063\u3066\u6d88\u3059\u3002<br \/>\n\u30fb\u30e6\u30fc\u30b6\u30fc\u306e\u524a\u9664\u306fdelete from user where user=&#8217;\u30e6\u30fc\u30b6\u30fc&#8217;\u3067\u884c\u3046\u3002<br \/>\n\u30fb\u30d1\u30b9\u30ef\u30fc\u30c9\u306fset password=password(&#8216;\u65b0\u30d1\u30b9\u30ef\u30fc\u30c9&#8217;);\u3067\u5909\u66f4\u53ef\u80fd\u3002\u4ed6\u4eba\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u306fset password for \u30e6\u30fc\u30b6\u30fc=&#8230;\u3067\u884c\u3046\u3002<br \/>\n\uff08\u3053\u3053\u3067\u8a00\u3046\u30e6\u30fc\u30b6\u30fc\u306f\u30b7\u30b9\u30c6\u30e0\u306e\u30e6\u30fc\u30b6\u30fc\u3068\u306f\u9055\u3046\u3002\u30ed\u30fc\u30ab\u30eb\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u8d8a\u3057\u306a\u3069\u3067\u63a5\u7d9a\u3059\u308bMySQL\u7528\u30e6\u30fc\u30b6\u30fc\u3092\u767b\u9332\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002\u30e6\u30fc\u30b6\u30fc\u306e\u30de\u30c3\u30d4\u30f3\u30b0\u3068\u304b\u3082\u6a5f\u80fd\u3067\u3042\u308b\u3089\u3057\u3044)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u52c9\u5f37\u3057\u3088\u3046\u3068\u601d\u3063\u3066\u305a\u3063\u3068\u653e\u7f6e\u3060\u3063\u305f\u3051\u3069\u5c11\u3057\u304b\u3058\u3063\u3066\u307f\u305f\u3002 Gentoo\u306b\u3064\u3044\u3066\u306eMySQL\u306e\u899a\u66f8\u3002\u307e\u305a\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304b\u3089\u4f7f\u3044\u51fa\u3059\u524d\u307e\u3067\u3002 \u25cf\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e96\u5099 \u4ed6\u306e\u30c7\u30a3\u30b9\u30c8\u30ea\u3067\u306fmysql\u30e6\u30fc\u30b6\u30fc\u3092\u8ffd\u52a0\u3059\u308b\u304c\u3001Gentoo [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-622","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"http:\/\/mio.servequake.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/mio.servequake.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/mio.servequake.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/mio.servequake.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/mio.servequake.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=622"}],"version-history":[{"count":0,"href":"http:\/\/mio.servequake.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/622\/revisions"}],"wp:attachment":[{"href":"http:\/\/mio.servequake.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/mio.servequake.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=622"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/mio.servequake.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}