{"id":1492,"date":"2011-07-30T14:34:43","date_gmt":"2011-07-30T14:34:43","guid":{"rendered":"https:\/\/supportmii.com\/pcdata\/?p=1492"},"modified":"2011-07-30T14:34:43","modified_gmt":"2011-07-30T14:34:43","slug":"mysql-did-you-forget-your-root-password","status":"publish","type":"post","link":"https:\/\/supportmii.com\/pcdata\/?p=1492","title":{"rendered":"MySQL &#8211; Did you forget your root password?"},"content":{"rendered":"<p>If you setup a MySQL server on to your Desktop to host a server or storing databases, you may have a lot of users to keep track of and especially the passwords. If you have forgotten your root account&#8217;s password, you will be searching everything to find a way to retrieve it without uninstalling MySQl correctly and installing it again.<\/p>\n<p>&nbsp;<\/p>\n<p>So I will be telling you one of the ways to reset your root account&#8217;s password.<\/p>\n<p>Open up a command prompt by doing (Windows Key+R) to bring a the Run Box.<br \/>\nNext, type in cmd and press enter<br \/>\nA command prompt should appear.<\/p>\n<p>Now what you want to do is to navigate to your MySQL Server installation and find the binmysqld or something similar to that.<\/p>\n<p>This important step requires to disable and also stop any MySQL Services that are running:<br \/>\nIn the run box, you can also type in &#8220;services.msc&#8221; to bring up the list of services and you will be able to find the MySQL services and you should then disable\/stop them.<\/p>\n<p>Now we need to create a .txt that pretty much resets our password to what you want:<\/p>\n<p><strong>UPDATE mysql.user SET Password=PASSWORD(&#8216;ragrag&#8217;) WHERE User=&#8217;root&#8217;;<\/strong><br \/>\n<strong>FLUSH PRIVILEGES;<\/strong><br \/>\n<strong>*<\/strong>This tells us that our new password will be reset to &#8220;ragrag&#8221;<\/p>\n<p>Finally, you can return to the command box and take note of the directory the mysqld.exe is in.<\/p>\n<p>You will want to &#8220;cd&#8221; into where the &#8220;mysqld.exe&#8221; file is in.<\/p>\n<p>Then enter this line into the cmd prompt:<\/p>\n<p>&nbsp;<\/p>\n<p>If you installed MySQL using the MySQL Installation Wizard, you may need to specify a <a href=\"http:\/\/dev.mysql.com\/doc\/refman\/5.0\/en\/option-files.html#option_general_defaults-file\"><code>--defaults-file<\/code><\/a> option:<\/p>\n<pre>C:&gt; <strong><code>\"C:Program FilesMySQLMySQL Server 5.0binmysqld-nt.exe\"<\/code><\/strong>\n         <strong><code>--defaults-file=\"C:\\Program Files\\MySQL\\MySQL Server 5.0\\my.ini\"<\/code><\/strong>\n         <strong><code>--init-file=C:\\mysql-init.txt<\/code><\/strong>\n<em>Source: (http:\/\/dev.mysql.com\/doc\/refman\/5.0\/en\/resetting-permissions.html)<\/em> \n\nThe format should look similar except changing the mysqld-nt.exe, you could use mysqld.exe\n And mysql-init.txt is where the \"UPDATE mysql.user SET Password\" code is in\n\nIf you need more assistance with this, I would be glad to make a video guide so you can follow the steps.<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you setup a MySQL server on to your Desktop to host a server or storing databases, you may have a lot of users to keep track of and especially the passwords. If you&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":1493,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,14,15,30,33,35,58,60,66,70],"tags":[],"class_list":["post-1492","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-computer","category-computer-tools","category-configuration","category-important","category-locked","category-login","category-services","category-settings","category-system","category-tweak"],"_links":{"self":[{"href":"https:\/\/supportmii.com\/pcdata\/index.php?rest_route=\/wp\/v2\/posts\/1492","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/supportmii.com\/pcdata\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/supportmii.com\/pcdata\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/supportmii.com\/pcdata\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/supportmii.com\/pcdata\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1492"}],"version-history":[{"count":0,"href":"https:\/\/supportmii.com\/pcdata\/index.php?rest_route=\/wp\/v2\/posts\/1492\/revisions"}],"wp:attachment":[{"href":"https:\/\/supportmii.com\/pcdata\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1492"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/supportmii.com\/pcdata\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1492"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/supportmii.com\/pcdata\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}