Ubuntu Mysql8.0创建远程用户还是无法远程链接

  1. 联系服务商是否有禁用端口,或者利用tomcat试试端口是否被服务商禁用
  2. 修改mysql配置文件
vim /etc/mysql/mysql.conf.d/mysqld.cnf


# If MySQL is running as a replication slave, this should be
# changed. Ref https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_tmpdir
# tmpdir                = /tmp
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
# default value 127.0.0.1
#bind-address           = 127.0.0.1

# edit it, 修改为0.0.0.0
bind-address            = 0.0.0.0

猜你喜欢

转载自blog.csdn.net/gxhea/article/details/131457750
今日推荐