V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Recommended Services
Amazon Web Services
LeanCloud
New Relic
ClearDB
chenqh
V2EX  ›  云计算

关于 TX 云 ubuntu16.04 安装 mysql 连接的问题

  •  
  •   chenqh · 2017-12-28 20:37:36 +08:00 · 2008 次点击
    这是一个创建于 2282 天前的主题,其中的信息可能已经有所发展或是发生改变。

    当使用localhost的时候能够连接

    ubuntu@VM-25-23-ubuntu:/home/xxx/.qqbot-tmp$ mysql -u seafile -p -h localhost
    Enter password: 
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 14
    Server version: 5.7.20-0ubuntu0.16.04.1 (Ubuntu)
    
    Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
    
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    
    

    当使用127.0.0.1时,却这样

    ubuntu@VM-25-23-ubuntu:/home/xxx/.qqbot-tmp$ mysql -u seafile -p -h 127.0.0.1
    Enter password: 
    ERROR 1045 (28000): Access denied for user 'seafile'@'10.186.25.23' (using password: YES)
    
    

    这种问题怎么解决 ?

    第 1 条附言  ·  2017-12-28 21:27:42 +08:00
    搞定了谢谢各位
    3 条回复    2017-12-28 21:28:01 +08:00
    cnta
        1
    cnta  
       2017-12-28 21:04:58 +08:00
    0.0.0.0 试试?
    xiaoz
        2
    xiaoz  
       2017-12-28 21:22:36 +08:00
    此问题和“ TX 云”无关,请检查你数据库用户的连接权限,权限有:localhost/127.0.0.1/%
    Loyalsoldier
        3
    Loyalsoldier  
       2017-12-28 21:28:01 +08:00
    2 楼正解。

    自建用户需要授权 127.0.0.1 和 localhost,如果你总是换着用的话……
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1500 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 23:53 · PVG 07:53 · LAX 16:53 · JFK 19:53
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.