python 验证mysql_(Python)MySQL数据库身份验证troub

我尝试运行下面的代码,将symbols变量的组件添加到名为securities\u master的数据库中。我之前发布了这个问题,并修复了大量错误,但是,我仍然收到以下错误:Traceback (most recent call last):

File "C:/Users/Nathan/.PyCharmCE2018.1/config/scratches/scratch.py", line 28, in

insert_btc_symbols(symbols)

File "C:/Users/Nathan/.PyCharmCE2018.1/config/scratches/scratch.py", line 15, in insert_btc_symbols

con = MySQLdb.connect(host=db_host,user=db_user,db=db_name) #,passwd=db_pass

File "C:\Python27\lib\site-packages\MySQLdb\__init__.py", line 81, in Connect

return Connection(*args, **kwargs)

File "C:\Python27\lib\site-packages\MySQLdb\connections.py", line 193, in __init__

super(Connection, self).__init__(*args, **kwargs2)

_mysql_exceptions.OperationalError: (1251, 'Client does not support authentication protocol requested by server; consider upgrading MySQL client')

Process finished with exit code 1

我尝试通过没有密码的用户和根用户以及密码的公钥进行连接,但都没有成功。以下是我正在执行的代码:

^{pr2}$

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值