{"id":1276,"date":"2019-07-05T17:49:55","date_gmt":"2019-07-05T14:49:55","guid":{"rendered":"https:\/\/artem.services\/?p=1259"},"modified":"2019-07-16T12:27:20","modified_gmt":"2019-07-16T09:27:20","slug":"fix-error-wordpress-the-server-requested-authentication-method-unknown-to-the-client-caching-sha2-password","status":"publish","type":"post","link":"https:\/\/artem.services\/?p=1276&lang=en","title":{"rendered":"FIX ERROR &#8212; WordPress: The server requested authentication method unknown to the client [caching_sha2_password]"},"content":{"rendered":"<p><span class=\"tlid-translation translation\" lang=\"en\"><span class=\"\" title=\"\">When installing <strong>WordPress<\/strong> using <strong>MySQL 8<\/strong>, the following error may occur:<\/span><\/span><\/p>\n<pre>Warning: mysqli_real_connect(): The server requested authentication method unknown to the client [caching_sha2_password]<\/pre>\n<p><span class=\"tlid-translation translation\" lang=\"en\"><span class=\"\" title=\"\">The reason is the default authorization method.<\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n<h3>Solution:<\/h3>\n<p><span class=\"tlid-translation translation\" lang=\"en\"><span class=\"\" title=\"\">In the file &quot;<strong>\/etc\/my.cnf<\/strong>&quot; in the block &quot;<strong>mysqld<\/strong>&quot; add the following:<\/span><\/span><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ndefault-authentication-plugin=mysql_native_password\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><span class=\"tlid-translation translation\" lang=\"en\"><span class=\"\" title=\"\">And restart the <strong>mysqld<\/strong> service:<\/span><\/span><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsystemctl restart mysqld\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><span class=\"tlid-translation translation\" lang=\"en\"><span class=\"\" title=\"\">If the user has already been created using the &quot;<strong>caching_sha2_password<\/strong>&quot; method, then you need to log in to <strong>mysql<\/strong> and do the following:<\/span><\/span><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nalter user 'username'@'localhost' identified with mysql_native_password by 'password';\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>When installing WordPress using MySQL 8, the following error may occur: Warning: mysqli_real_connect(): The server requested authentication method unknown to the client [caching_sha2_password] The reason is the default authorization method. &nbsp; Solution: In the file &quot;\/etc\/my.cnf&quot; in the block &quot;mysqld&quot; add the following: &nbsp; And restart the mysqld service: &nbsp; If the user has already &hellip; <a href=\"https:\/\/artem.services\/?p=1276&#038;lang=en\" class=\"more-link\">\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0447\u0438\u0442\u0430\u0442\u044c<span class=\"screen-reader-text\"> &quot;FIX ERROR &#8212; WordPress: The server requested authentication method unknown to the client [caching_sha2_password]&quot;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[357],"tags":[999,361,365,1001,1003],"_links":{"self":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/1276"}],"collection":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1276"}],"version-history":[{"count":2,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/1276\/revisions"}],"predecessor-version":[{"id":1281,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/1276\/revisions\/1281"}],"wp:attachment":[{"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1276"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1276"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1276"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}