{"id":1005,"date":"2011-02-04T23:23:42","date_gmt":"2011-02-04T14:23:42","guid":{"rendered":"http:\/\/www.kazu.tv\/blog\/?p=1005"},"modified":"2011-02-04T23:23:42","modified_gmt":"2011-02-04T14:23:42","slug":"mysql_root_acce","status":"publish","type":"post","link":"https:\/\/kazu.tv\/blog\/2011\/02\/04\/mysql_root_acce\/","title":{"rendered":"MySQL\u3067root\u306a\u306e\u306baccess denied"},"content":{"rendered":"<p>MySQL\u306eroot\u30e6\u30fc\u30b6\u30fc\u3067DB\u3092\u4f5c\u6210\u3057\u3066\u3001\u305d\u306e\u30e6\u30fc\u30b6\u30fc\u306b\u6a29\u9650\u3092\u4e0e\u3048\u3088\u3046\u3068\u3057\u305f\u3089Access denied\u306e\u30a8\u30e9\u30fc\u304c\u51fa\u305f\u3002<\/p>\n<pre class=\"brush: plain; code\">\nmysql&gt; grant all on foodb.* to 'foo'@'localhost';\nERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'foodb'\n<\/pre>\n<h3>\u25a0\u554f\u984c\u306e\u8a73\u7d30\uff08\uff1f\uff09<\/h3>\n<p>\u767a\u751f\u524d\u306b\u3084\u3063\u305f\u4e8b\u3002<\/p>\n<p>1. root\u30e6\u30fc\u30b6\u30fc\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u7a7a\u3060\u3063\u305f\u306e\u3067\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u8a2d\u5b9a\u3002<\/p>\n<pre class=\"brush: plain; code\">\nGRANT USAGE ON *.* TO 'root'@'localhost' IDENTIFIED BY 'newpassword'<\/pre>\n<p>2. DB\u4f5c\u6210<\/p>\n<pre class=\"brush: plain; code\">\nCREATE DATABASE foodb;<\/pre>\n<p>3. \u4e0a\u8ff0\u306e\u901a\u308a\u3001GRANT ALL &#8230; \u3092\u3084\u308d\u3046\u3068\u3057\u3066\u30a8\u30e9\u30fc\u767a\u751f\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><!--more--><\/p>\n<h3>\u25a0\u89e3\u6c7a\u65b9\u6cd5\u30fb\u30fb\u30fb<\/h3>\n<p>MySQL\u306e\u518d\u8d77\u52d5\u3067\u76f4\u3063\u305f\u30fb\u30fb\u30fb<\/p>\n<h3>\u25a0\u74b0\u5883<\/h3>\n<ul>\n<li>CentOS 5.5<\/li>\n<li>mysql-5.1.54-1.el5.remi<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MySQL\u306eroot\u30e6\u30fc\u30b6\u30fc\u3067DB\u3092\u4f5c\u6210\u3057\u3066\u3001\u305d\u306e\u30e6\u30fc\u30b6\u30fc\u306b\u6a29\u9650\u3092\u4e0e\u3048\u3088\u3046\u3068\u3057\u305f\u3089Access denied\u306e\u30a8\u30e9\u30fc\u304c\u51fa\u305f\u3002 mysql&gt; grant all on foodb.* to &#8216;foo&#8217;@&#8217;localh&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[15],"tags":[868,869,178],"class_list":["post-1005","post","type-post","status-publish","format-standard","hentry","category-15","tag-access-denied","tag-grant","tag-mysql"],"_links":{"self":[{"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/posts\/1005","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/comments?post=1005"}],"version-history":[{"count":0,"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/posts\/1005\/revisions"}],"wp:attachment":[{"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/media?parent=1005"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/categories?post=1005"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/tags?post=1005"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}