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

vps网友提供 12-28 讨论归档 3

当使用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)

这种问题怎么解决 ?

本文由 vps网友提供,转载请注明出处

本文链接: https://www.vpsvsvps.com/discuss/a/1676471889226108928.html

标签:
Loyalsoldier
12-28

2 楼正解。

自建用户需要授权 127.0.0.1 和 localhost,如果你总是换着用的话……

xiaoz
12-28

此问题和“ TX 云”无关,请检查你数据库用户的连接权限,权限有:localhost/127.0.0.1/%

cnta
12-28

0.0.0.0 试试?