{"id":69,"date":"2019-11-03T19:29:17","date_gmt":"2019-11-03T12:29:17","guid":{"rendered":"http:\/\/naitinoi.com\/?p=69"},"modified":"2019-11-03T19:35:50","modified_gmt":"2019-11-03T12:35:50","slug":"how-to-recovery-mysql-root-password","status":"publish","type":"post","link":"https:\/\/omtel.ltd\/index.php\/2019\/11\/03\/how-to-recovery-mysql-root-password\/","title":{"rendered":"How to Recovery MySQL Root Password"},"content":{"rendered":"<p>1 ) Stop MySql Server Service<br \/>\n[root@naitinoi ~]# \/etc\/init.d\/mysqld stop<br \/>\nStopping mysqld: [ OK ]<\/p>\n<p>2) Start MySQL server w\/o password:<br \/>\n[root@naitinoi ~]# mysqld_safe \u2013skip-grant-tables &amp;<br \/>\n[1] 6462<br \/>\n[root@naitinoi ~]# 151105 08:47:32 mysqld_safe Logging to \u2018\/var\/log\/mysqld.log\u2019.<br \/>\n151105 08:47:32 mysqld_safe Starting mysqld daemon with databases from \/var\/lib\/mysql<\/p>\n<p>3) Login as root<br \/>\n[root@naitinoi ~]# mysql -u root<br \/>\nWelcome to the MySQL monitor. Commands end with ; or \\g.<br \/>\nYour MySQL connection id is 1<br \/>\nServer version: 5.x.xx MySQL Community Server (GPL) by Remi<\/p>\n<p>Copyright (c) 2000, 2015, Oracle and\/or its affiliates. All rights reserved.<\/p>\n<p>Oracle is a registered trademark of Oracle Corporation and\/or its<br \/>\naffiliates. Other names may be trademarks of their respective<br \/>\nowners.<\/p>\n<p>Type \u2018help;\u2019 or \u2018\\h\u2019 for help. Type \u2018\\c\u2019 to clear the current input statement.<\/p>\n<p>mysql&gt; use mysql;<br \/>\nReading table information for completion of table and column names<br \/>\nYou can turn off this feature to get a quicker startup with -A<\/p>\n<p>Database changed<br \/>\nmysql&gt; update user set password=PASSWORD(\u201cnew password here\u201d) where User=\u2019root&#8217;;<br \/>\nQuery OK, 3 rows affected (0.01 sec)<br \/>\nRows matched: 3 Changed: 3 Warnings: 0<\/p>\n<p>mysql&gt; flush privileges;<br \/>\nQuery OK, 0 rows affected (0.01 sec)<\/p>\n<p>mysql&gt; quit<br \/>\nBye<\/p>\n<p>4) Stop MySQL server w\/o password:<br \/>\n[root@naitinoi ~]# \/etc\/init.d\/mysqld stop<br \/>\n151105 08:49:26 mysqld_safe mysqld from pid file \/var\/run\/mysqld\/mysqld.pid ended<br \/>\nStopping mysqld: [ OK ]<br \/>\n[1]+ Done mysqld_safe \u2013skip-grant-tables<\/p>\n<p>5) Start MySql Server Service<br \/>\n[root@naitinoi ~]# \/etc\/init.d\/mysqld start<br \/>\nStarting mysqld: [ OK ]<\/p>\n<p>6) Login<br \/>\n[root@naitinoi ~]# mysql -u root -p<br \/>\nEnter password:<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1 ) Stop MySql Server Service [root@naitinoi ~]# \/etc\/i [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-69","post","type-post","status-publish","format-standard","hentry","category-mysql"],"_links":{"self":[{"href":"https:\/\/omtel.ltd\/index.php\/wp-json\/wp\/v2\/posts\/69","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/omtel.ltd\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/omtel.ltd\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/omtel.ltd\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/omtel.ltd\/index.php\/wp-json\/wp\/v2\/comments?post=69"}],"version-history":[{"count":1,"href":"https:\/\/omtel.ltd\/index.php\/wp-json\/wp\/v2\/posts\/69\/revisions"}],"predecessor-version":[{"id":70,"href":"https:\/\/omtel.ltd\/index.php\/wp-json\/wp\/v2\/posts\/69\/revisions\/70"}],"wp:attachment":[{"href":"https:\/\/omtel.ltd\/index.php\/wp-json\/wp\/v2\/media?parent=69"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/omtel.ltd\/index.php\/wp-json\/wp\/v2\/categories?post=69"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/omtel.ltd\/index.php\/wp-json\/wp\/v2\/tags?post=69"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}