title: Failed to connect to MySQL: (1045) Access denied for user 'root'@'localhost' (using password: YES)
body: <p>I am deploying a Wordpress enviroment, and there seems to happen a weird situation.</p>
  
  <p>I did some tweakings and set a new root password like this</p>
  
  <pre><code>mysql -u root –p
  SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass');
  GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'MyNewPass';
  service mysql restart
  ufw allow 3306
  </code></pre>
  
  <p>then I changed the settings of <code>bind</code> from <code>/etc/mysql/mysql.conf.d</code> to from <code>127.0.0.1</code> to  <code>0.0.0.0</code> so that I can access it via mySQL Workbench. Which was successful as I now am able to enter the DB from outside sources.</p>
  
  <p>Once I changed the password, I altered the <code>wp-config.php</code> file and set the new credentials.</p>
  
  <p><a href="https://i.stack.imgur.com/oL5j2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oL5j2.png" alt="enter image description here"></a></p>
  
  <p>However, now, I am getting errors inside the WordPress whenever I log on, I see the following errors, despite the fact that the website runs without any issues and the articles appear.</p>
  
  <pre><code> Failed to connect to MySQL: (1045) Access denied for user 'root'@'localhost' (using password: YES)
  </code></pre>
  
  <p>Below is an image of the error I am getting</p>
  
  <p><a href="https://i.stack.imgur.com/CzRgn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CzRgn.png" alt="enter image description here"></a></p>
  
  <p>I tried manny different scenarios on SO, and I am really sorry in advance for posting this again, but non of the solutions provided work. </p>
  
  <p>Any ideas on resolving this?</p>
  
  <p>And while we are at it,</p>
  
  <ol>
  <li>what does <code>(using password: YES)</code> or <code>(using password: NO)</code> mean ?</li>
  <li>What is the difference between <code>root@localhost</code> and <code>root@127.0.0.1</code></li>
  </ol>