{"id":792,"date":"2012-04-10T11:13:33","date_gmt":"2012-04-10T07:13:33","guid":{"rendered":"http:\/\/saradmin.ru\/?p=792"},"modified":"2012-04-10T11:13:33","modified_gmt":"2012-04-10T07:13:33","slug":"%d0%be%d1%88%d0%b8%d0%b1%d0%ba%d0%b0-host-is-not-allowed-to-connect-to-this-mysql-server","status":"publish","type":"post","link":"https:\/\/saradmin.ru\/?p=792","title":{"rendered":"\u041e\u0448\u0438\u0431\u043a\u0430 &#171;Host is not allowed to connect to this MySQL server&#187;"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/saradmin.ru\/wp-content\/uploads\/mysql_150.jpg\" alt=\"MySQL\" title=\"MySQL\" width=\"150\" height=\"150\" class=\"alignleft size-full wp-image-794\" \/><strong>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/strong>: \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a MySQL-\u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 &#171;Host &#8216;\u0442\u0430\u043a\u043e\u0439-\u0442\u043e&#8217; is not allowed to connect to this MySQL server&#187;. \u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0435\u0441\u044c \u043a MySQL-\u0441\u0435\u0440\u0432\u0435\u0440\u0443, \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0441 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e IP-\u0430\u0434\u0440\u0435\u0441\u0430.<\/p>\n<p><strong>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/strong>: \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u044e\u0437\u0435\u0440\u0443 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0431\u0430\u0437\u0435 \u043b\u0438\u0431\u043e \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, &#8216;10.10.10.10&#8217;@&#8217;user&#8217;), \u043b\u0438\u0431\u043e \u0441 \u043b\u044e\u0431\u043e\u0433\u043e IP-\u0430\u0434\u0440\u0435\u0441\u0430 (&#8216;%&#8217;@&#8217;user&#8217;).<\/p>\n<p><strong>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044f<\/strong>: \u0412 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043b\u043e\u0433\u0438\u043d\u0438\u043c\u0441\u044f \u043d\u0430 MySQL-\u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u0434 \u043b\u043e\u0433\u0438\u043d\u043e\u043c root \u0441 \u0435\u0433\u043e \u043f\u0430\u0440\u043e\u043b\u0435\u043c, \u0441\u043e\u0437\u0434\u0430\u0435\u043c (\u0438\u043b\u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c, \u0435\u0441\u043b\u0438 \u043e\u043d \u0443\u0436\u0435 \u0435\u0441\u0442\u044c) \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u043d\u0443\u0436\u043d\u043e\u0439 \u043d\u0430\u043c \u0431\u0430\u0437\u0435 \u0441 \u043b\u044e\u0431\u043e\u0433\u043e IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439:<\/p>\n<p><code><br \/>\n~# mysql -u root mysql -p<\/p>\n<p>mysql> GRANT ALL PRIVILEGES ON <em>database<\/em>.* TO <em>username<\/em>@\"%\" IDENTIFIED BY '<em>password<\/em>' WITH GRANT OPTION;<br \/>\nmysql> exit;<\/p>\n<p>~# mysqladmin -u root -p flush-privileges<br \/>\n<\/code><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c <em>database<\/em> \u044d\u0442\u043e \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e <em>username<\/em> \u0441 \u043f\u0430\u0440\u043e\u043b\u0435\u043c <em>password<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a MySQL-\u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 &#171;Host &#8216;\u0442\u0430\u043a\u043e\u0439-\u0442\u043e&#8217; is not allowed to connect to this MySQL server&#187;. \u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0435\u0441\u044c \u043a MySQL-\u0441\u0435\u0440\u0432\u0435\u0440\u0443, \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0441 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e IP-\u0430\u0434\u0440\u0435\u0441\u0430. \u0420\u0435\u0448\u0435\u043d\u0438\u0435: \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u044e\u0437\u0435\u0440\u0443 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0431\u0430\u0437\u0435 \u043b\u0438\u0431\u043e \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, &#8216;10.10.10.10&#8217;@&#8217;user&#8217;), [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[26,1],"tags":[118,44,24,23,41],"class_list":["post-792","post","type-post","status-publish","format-standard","hentry","category-linux","category-main","tag-mysql","tag-44","tag-24","tag-23","tag-41"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p2HrGV-cM","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/saradmin.ru\/index.php?rest_route=\/wp\/v2\/posts\/792","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/saradmin.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/saradmin.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/saradmin.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/saradmin.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=792"}],"version-history":[{"count":5,"href":"https:\/\/saradmin.ru\/index.php?rest_route=\/wp\/v2\/posts\/792\/revisions"}],"predecessor-version":[{"id":798,"href":"https:\/\/saradmin.ru\/index.php?rest_route=\/wp\/v2\/posts\/792\/revisions\/798"}],"wp:attachment":[{"href":"https:\/\/saradmin.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=792"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/saradmin.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=792"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/saradmin.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=792"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}