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) :
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:
SOLUTION
replace 'localhost
' by 127.0.0.1