title: Regaining access to lost MySQL password for PHPMyAdmin on WAMP
body: <p>I changed the password for my <strong>'root'@'localhost'</strong> account in PHPMyAdmin and like (<a href="https://stackoverflow.com/questions/19482371/fix-access-denied-for-user-rootlocalhost-for-phpmyadmin">this person asking here</a>) and locked myself out of PHPMyAdmin on my browser. I am using WAMP 2.5.</p>
  
  <p>The solutions offered on that question don’t work for me because unfortunately I have lost the password that I reassigned <strong>root</strong> to.</p>
  
  <p>Some solutions ask one to reset the password via command line (<a href="https://www.howtoforge.com/setting-changing-resetting-mysql-root-passwords" rel="noreferrer">including this source</a>), and I have tried that through the Windows command line without success because I now have no privileges:</p>
  
  <pre><code>mysql&gt; SET PASSWORD FOR 'root'@'localhost' = PASSWORD('mynewpassword');
  
  ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'
  </code></pre>
  
  <p>WAMP comes with a MySQL Console but I am unable to use it since it prompts me for a password which as I stated, no longer have.</p>
  
  <p><a href="https://www.youtube.com/watch?v=lBvfa1wmlbI" rel="noreferrer">This video explains how to change passwords</a>, and it agrees with the answers in the StackExchange answer above, but evidently, I need another method to do this now since I did not know I would lose access as the guy warns.</p>
  
  <p>I would appreciate any advice and apologise if this is a newbie type of thing to ask. I am just getting the hang of using a stack for web development, and configuring access to a LAN site through WAMP was quite an adventure, so if possible, I would prefer something that does not require reinstalling everything again.</p>
  
  <p><strong>Edit 1</strong>: Went ahead and tried @RiggsFolly ’s solution. While I can access the <code>my.ini</code> file, make changes without problem, and restart MySQL without issue through WAMP or otherwise, the line <code>skip-grant-tables</code> is not taking effect, leaving me with a password prompt or no access to do anything. (I wrote a new question here to troubleshoot this since I feel like this is a different issue.)</p>
  
  <p><strong>Edit 2</strong>: I tried the instructions in the link provided by @t.niese in the comments and when I set the console to return feedback on the instructions, it reported this, and failed to change anything:</p>
  
  <pre><code>C:\wamp\bin\mysql\mysql5.6.17\bin&gt;mysqld --skip-grant-tables --console
  [Note] Plugin 'FEDERATED' is disabled.
  [Note] InnoDB: Using atomics to ref count buffer pool pages
  [Note] InnoDB: The InnoDB memory heap is disabled
  [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
  [Note] InnoDB: Compressed tables use zlib 1.2.3
  [Note] InnoDB: Not using CPU crc32 instructions
  [Note] InnoDB: Initializing buffer pool, size = 128.0M
  [Note] InnoDB: Completed initialization of buffer pool
  [ERROR] InnoDB: .\ibdatai can't be opened in read-write mode
  [ERROR] InnoDB: The system tablespace must be writabe!
  [ERROR] Plugin 'InnoDB' init function returned error.
  [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
  [ERROR] Unknown/unsupported storage engine: InnoDB
  [ERROR] Aborting
  [Note] /* List of plugins shutting down */
  </code></pre>