{"id":9876,"date":"2019-01-31T16:39:10","date_gmt":"2019-01-31T07:39:10","guid":{"rendered":"https:\/\/www.itblog.jp\/?p=9876"},"modified":"2019-01-31T16:39:32","modified_gmt":"2019-01-31T07:39:32","slug":"php-artisan-migrate%e3%81%a7access-denied-for-user-homesteadlocalhost%e3%81%ab%e5%af%be%e5%87%a6","status":"publish","type":"post","link":"https:\/\/www.itblog.jp\/?p=9876","title":{"rendered":"php artisan migrate\u3067Access denied for user &#8216;homestead&#8217;@&#8217;localhost&#8217;\u306b\u5bfe\u51e6"},"content":{"rendered":"<p>Homestead\u306elaravel\u3067\u3001artisan migrate\u3067\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u3088\u3046\u3068\u3057\u305f\u3068\u3053\u308d\u3001\u30a8\u30e9\u30fc\u304c\u8d77\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u5b9f\u884c\u3057\u305f\u30b3\u30de\u30f3\u30c9<br \/>\nphp artisan migrate<\/p>\n<p>\u30a8\u30e9\u30fc\u306e\u5185\u5bb9<br \/>\nSQLSTATE[HY000] [1045] Access denied for user &#8216;homestead&#8217;@&#8217;localhost&#8217; (usin<br \/>\n  g password: YES) (SQL: select * from information_schema.tables where table_<br \/>\n  schema = homestead and table_name = migrations) <\/p>\n<p>\u539f\u56e0\u306b\u3064\u3044\u3066\u3067\u3059\u304c\u3001laravel\u306e\u5b9f\u884c\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u3001\u300c.env\u300d\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3068\u3044\u3046\u3053\u3068\u306a\u306e\u3067\u3001\u7de8\u96c6\u3057\u3066\u307f\u307e\u3057\u305f\u304c\u3001\u7d50\u5c40\u540c\u3058\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u63a5\u7d9a\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<p>\u3055\u3089\u306b\u539f\u56e0\u3092\u8abf\u3079\u3066\u307f\u305f\u306e\u3067\u3059\u304c\u3001\u300c.env\u300d\u30d5\u30a1\u30a4\u30eb\u3092\u5909\u66f4\u3057\u3066\u3082\u305d\u308c\u3092\u53cd\u6620\u3055\u305b\u308b\u305f\u3081\u306b\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>laravel\u306e\u5b9f\u884c\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<p>php artisan config:clear<\/p>\n<p>\u3053\u308c\u3067\u3001\u518d\u5ea6\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3057\u305f\u3068\u3053\u308d\u3001\u554f\u984c\u306a\u304f\u5b9f\u884c\u3055\u308c\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u3082\u53cd\u6620\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Homestead\u306elaravel\u3067\u3001artisan migrate\u3067\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u3088\u3046\u3068\u3057\u305f\u3068\u3053\u308d\u3001\u30a8\u30e9\u30fc\u304c\u8d77\u304d\u307e\u3057\u305f\u3002 \u5b9f\u884c\u3057\u305f\u30b3\u30de\u30f3\u30c9 php artisan migrate \u30a8\u30e9\u30fc\u306e\u5185\u5bb9 SQLSTATE[ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[140,131],"tags":[],"class_list":["post-9876","post","type-post","status-publish","format-standard","hentry","category-laravel","category-131"],"_links":{"self":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts\/9876","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9876"}],"version-history":[{"count":0,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts\/9876\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9876"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9876"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}