- 联系服务商是否有禁用端口,或者利用tomcat试试端口是否被服务商禁用
- 修改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
文章指导读者如何确认服务商是否限制了端口,并提供了通过Tomcat测试端口使用情况的方法。同时,文章详细介绍了如何编辑MySQL配置文件(mysqld.cnf),将bind-address改为0.0.0.0以允许从任何IP地址访问MySQL服务。
1091

被折叠的 条评论
为什么被折叠?



