PyMySQL Access Denied “using password (no”) but using password

后端 未结 2 427
自闭症患者
自闭症患者 2021-01-18 21:31

Headscratcher here for me.

I am attempting to connect to a database on my local MySQL 8.0.11.0 install from Python.

Here\'s the code I\'m u

相关标签:
2条回答
  • 2021-01-18 22:01

    That is strange. I would install pymysql in a virtual environment and then drop some debugging lines in this function:

    https://github.com/PyMySQL/PyMySQL/blob/master/pymysql/connections.py#L940

    That should show what variables its actually using for the connection and make it obvious what is wrong.

    0 讨论(0)
  • 2021-01-18 22:09

    Resolved the issue after downgrading MySQL from 8.0.11.0 to 5.7.22.

    In addition to what I listed in my original question, I also tried the following:

    • Installed lower version of PyMySQL (0.8.1 to 0.8.0 in my case)
    • Completely removed both versions of PyMySQL and installed v0.8.0
    • Removed MySQL 8.0 and reinstalled

    When none of the above worked, I downgraded MySQL to v5.7, which is what one of my peers is using. That resolved the error.

    0 讨论(0)
提交回复
热议问题