{"id":645,"date":"2012-11-17T10:18:28","date_gmt":"2012-11-17T10:18:28","guid":{"rendered":"http:\/\/www.plugged.in\/?p=645"},"modified":"2012-11-17T10:18:28","modified_gmt":"2012-11-17T10:18:28","slug":"resetting-mysql-root-password-on-centos","status":"publish","type":"post","link":"https:\/\/www.veriteknik.net.tr\/en\/resetting-mysql-root-password-on-centos\/","title":{"rendered":"Resetting MySQL Root Password on CentOS"},"content":{"rendered":"<p>It is not uncommon for you to need the MySQL root password of a server, especially when you&#8217;re dealing with hundreds of different servers. Here&#8217;s the quickest way to reset it. (Don&#8217;t forget that you need to login to your server as <strong>root<\/strong> in order to achieve this)<\/p>\n<p>1) Start MySQL in safe mode.<\/p>\n<p>2) Reset the root password.<\/p>\n<p>3) Flush privileges.<\/p>\n<p>4) Create a my.cnf file so that you can automatically log-in next time.<\/p>\n<pre class=\"brush: text; gutter: true; first-line: 1\"># service mysqld stop\n# mysqld_safe --skip-grant-tables &amp;\n# mysql -u root\n&gt; update mysql.user set password=PASSWORD(\"newpass\") where User='root';\n&gt; flush privileges;\n&gt; exit;\n# { echo \"[client]\"; echo \"user=root\"; echo \"password=newpass\"; } &gt;&gt; \/root\/.my.conf\n# service mysqld restart<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>It is not uncommon for you to need the MySQL root password of a server, especially when you&#8217;re dealing with hundreds of different servers. Here&#8217;s the quickest way to reset it. (Don&#8217;t forget that you need to login to your server as root in order to achieve this) 1) Start MySQL in safe mode. 2) [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[363,364],"tags":[],"yst_prominent_words":[665,619,1628,666,1627,337],"class_list":["post-645","post","type-post","status-publish","format-standard","hentry","category-databases","category-mysql-databases"],"jetpack_featured_media_url":"","uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Mustafa Emre Ayd\u0131n","author_link":"https:\/\/www.veriteknik.net.tr\/en\/author\/eaydin\/"},"uagb_comment_info":0,"uagb_excerpt":"It is not uncommon for you to need the MySQL root password of a server, especially when you&#8217;re dealing with hundreds of different servers. Here&#8217;s the quickest way to reset it. (Don&#8217;t forget that you need to login to your server as root in order to achieve this) 1) Start MySQL in safe mode. 2)&hellip;","_links":{"self":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts\/645","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/comments?post=645"}],"version-history":[{"count":0,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts\/645\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/media?parent=645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/categories?post=645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/tags?post=645"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/yst_prominent_words?post=645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}