{"id":3412,"date":"2011-03-22T09:47:46","date_gmt":"2011-03-22T07:47:46","guid":{"rendered":"http:\/\/code.openark.org\/blog\/?p=3412"},"modified":"2011-03-22T09:47:46","modified_gmt":"2011-03-22T07:47:46","slug":"recovering-a-mysql-root-password-the-fourth-solution","status":"publish","type":"post","link":"https:\/\/code.openark.org\/blog\/mysql\/recovering-a-mysql-root-password-the-fourth-solution","title":{"rendered":"Recovering a MySQL `root` password: the fourth solution"},"content":{"rendered":"<p>Have just read Darren Cassar&#8217;s <a title=\"Permanent Link to Recovering a MySQL `root` password \u2013 Three solutions\" rel=\"bookmark\" href=\"http:\/\/mysqlpreacher.com\/wordpress\/2011\/03\/recovering-a-mysql-root-password-three-solutions\/\">Recovering a MySQL `root` password \u2013 Three solutions<\/a>. There&#8217;s a fourth solution: using an <strong>init-file<\/strong>, which leads to just one restart of the database instead of two. It also avoids the security issue involved with using <strong>skip-grant-tables<\/strong>.<\/p>\n<p>I&#8217;ve written all about it before on <a title=\"Permanent Link to Dangers of skip-grant-tables\" rel=\"bookmark\" href=\"http:\/\/code.openark.org\/blog\/mysql\/dangers-of-skip-grant-tables\">Dangers of skip-grant-tables<\/a>.<\/p>\n<p>Darren&#8217;s 1st advice (look for password ini files, scripts, etc.) is a very good one. One password that can always be looked up in files is the replication&#8217;s password.<\/p>\n<p>Replication&#8217;s password is easily forgotten: you only set it once and never use it again; never script it nor manually login with. When setting up new slaves, though, you suddenly need it.<\/p>\n<p>Apparently not many realize that the replication password is written in plaintext in the <strong>master.info<\/strong> file. This file tells the slave all about it&#8217;s master connection: host, port, user &amp; password are all there for you to read.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Have just read Darren Cassar&#8217;s Recovering a MySQL `root` password \u2013 Three solutions. There&#8217;s a fourth solution: using an init-file, which leads to just one restart of the database instead of two. It also avoids the security issue involved with using skip-grant-tables. I&#8217;ve written all about it before on Dangers of skip-grant-tables. Darren&#8217;s 1st advice [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_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,"enabled":false},"version":2}},"categories":[5],"tags":[11,8,16],"class_list":["post-3412","post","type-post","status-publish","format-standard","hentry","category-mysql","tag-configuration","tag-replication","tag-security"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2bZZp-T2","_links":{"self":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts\/3412","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/comments?post=3412"}],"version-history":[{"count":8,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts\/3412\/revisions"}],"predecessor-version":[{"id":3420,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts\/3412\/revisions\/3420"}],"wp:attachment":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/media?parent=3412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/categories?post=3412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/tags?post=3412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}