0

I restored mysql dump and can be accessed in my terminal (I need to issue sudo mysql to access this db or even to start mysql) :

enter image description here

I know this is privilege issue. But when I call mysql in python program, I get this error:

   OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: NO)")

I tried both ways supplying password and keeping it blank.

Here is the screenshot:

enter image description here

SOLUTION

replace 'localhost' by 127.0.0.1

lpt
  • 931
  • 16
  • 35

0 Answers0