{"id":83,"date":"2011-08-24T11:04:05","date_gmt":"2011-08-24T09:04:05","guid":{"rendered":"http:\/\/elkano.org\/blog\/?p=83"},"modified":"2011-08-24T11:04:05","modified_gmt":"2011-08-24T09:04:05","slug":"access-denied-for-user-%e2%80%98debian-sys-maint%e2%80%99localhost%e2%80%99-using-password-yes","status":"publish","type":"post","link":"https:\/\/elkano.org\/blog\/access-denied-for-user-%e2%80%98debian-sys-maint%e2%80%99localhost%e2%80%99-using-password-yes\/","title":{"rendered":"Access denied for user \u2018debian-sys-maint\u2019@&#8217;localhost\u2019 (using password: YES)"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>I had this error \u00a0when I moved all database server files, \u00a0phisically, \u00a0from one server to another for replication purposes and used the mysql startup script. The new server is a Debian Squeeze, \u00a0in debian there is a user <strong>debian-sys-maint<\/strong> \u00a0 to do maintenance tasks, \u00a0to avoid this error with the mysql startup script you have to create this user in your new database server.<\/p>\n<p>&nbsp;<\/p>\n<p>The password for this user can be seen in this file:<\/p>\n<p><code><br \/>\n<strong># cat \/etc\/mysql\/debian.cnf<\/strong><\/code><\/p>\n<p># Automatically generated for Debian scripts. DO NOT TOUCH!<br \/>\n[client]\nhost = localhost<br \/>\nuser = debian-sys-maint<br \/>\npassword = password<br \/>\nsocket = \/var\/run\/mysqld\/mysqld.sock<br \/>\n[mysql_upgrade]\nhost = localhost<br \/>\nuser = debian-sys-maint<br \/>\npassword = password<br \/>\nsocket = \/var\/run\/mysqld\/mysqld.sock<br \/>\nbasedir = \/usr<\/p>\n<p>To create the user, \u00a0log in as mysql root user and run this statement:<\/p>\n<pre><strong>GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'password'; <\/strong><\/pre>\n<p>In my case, \u00a0the original server was a Centos 5.5, \u00a0so that the user debian-sys-maint did not exist, \u00a0but in case the server was another Debian you can use the same statement to only reset the user password.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; I had this error \u00a0when I moved all database server files, \u00a0phisically, \u00a0from one server to another for replication purposes and used the mysql startup script. The new server is a Debian Squeeze, \u00a0in debian there is a user debian-sys-maint \u00a0 to do maintenance tasks, \u00a0to avoid this error with the mysql startup script [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,11],"tags":[10],"_links":{"self":[{"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/posts\/83"}],"collection":[{"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/comments?post=83"}],"version-history":[{"count":25,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/posts\/83\/revisions"}],"predecessor-version":[{"id":108,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/posts\/83\/revisions\/108"}],"wp:attachment":[{"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/media?parent=83"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/categories?post=83"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/tags?post=83"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}