zoukankan      html  css  js  c++  java
  • mysql身份验证问题

    【错误1】

      pymysql.err.InternalError: (1130, "Host '127.0.0.1' is not allowed to connect to this MySQL server")的错误解决

    【原因1】不容许本地机器连远程mysql服务,mysql 身份验证出现了问题

    【解决1】使用下列步骤解决即可

    mysql -u root -p
    
    mysql>use mysql;
    
    mysql>select 'host' from user where user='root';
    
    mysql>update user set host = '%' where user ='root';
    
    mysql>flush privileges;   #刷新权限

     

    【错误2】

    python连接数据库出现错误

    RuntimeError: cryptography is required for sha256_password or caching_sha2_password

    【解决2】

    安装cryptography
    
    pip install cryptography
    声明 欢迎转载,但请保留文章原始出处:) 博客园:https://www.cnblogs.com/chenxiaomeng/ 如出现转载未声明 将追究法律责任~谢谢合作
  • 相关阅读:
    csp-2020-s游记
    线性DP
    tarjan无向图
    tarjan有向图
    树前置知识普及
    hash
    可持久化线段树&主席树
    [HAOI 2015] 树上染色
    [Contest on 2020.11.24] Beetle
    [Contest on 2020.11.24] Candy
  • 原文地址:https://www.cnblogs.com/chenxiaomeng/p/15616017.html
Copyright © 2011-2022 走看看