panghua
V2EX  ›  问与答

django 无法链接 mysql

  •  
  •   panghua · Sep 20, 2019 · 1889 views
    This topic created in 2436 days ago, the information mentioned may be changed or developed.

    各位朋友,现在我用 db = pymysql.connect(host="", user="", password="", database="",port=0, charset='utf8')语句可以链接上数据库访问,但用 django 的链接方式还是链接不上,请问这个怎么处理!

    2 replies    2019-09-21 01:32:31 +08:00
    lgh
        1
    lgh  
       Sep 20, 2019 via iPhone
    全都是空,你是怎么判断出能连上的?
    hushao
        2
    hushao  
       Sep 21, 2019
    Django setting 文件里配置了数据库?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2877 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 05:15 · PVG 13:15 · LAX 22:15 · JFK 01:15
    ♥ Do have faith in what you're doing.