MYSQL: "Access denied for user 'X'@'localhost' (using password: YES)" PYTHON
<p>I'm trying to access the database using python but it's just not working. When I access a remote database everything is fine. But local there is some kind of problem. What I'm doing wroing here? I've tryied some things that I found on intener do grant access but they did not work</p>

<p>Local users:
<a href="https://i.stack.imgur.com/iKBaC.png" rel="noreferrer"><img src="https://i.stack.imgur.com/iKBaC.png" alt="enter image description here"></a></p>

<p>Code used:</p>

<p><a href="https://i.stack.imgur.com/yK2zK.png" rel="noreferrer"><img src="https://i.stack.imgur.com/yK2zK.png" alt="enter image description here"></a></p>

<p>Message recieved</p>

<p><a href="https://i.stack.imgur.com/CvXUG.png" rel="noreferrer"><img src="https://i.stack.imgur.com/CvXUG.png" alt="enter image description here"></a></p>

<p>Thanks for the help</p>