我无法从Azure访问我的Ubuntu 16.04.02 VPS上的MySQL服务器。我试着编辑/etc/mysql/my.cnf,但是什么也没做-没有像bind 127.0.0.1这样的东西。我使用通配符创建了用户,但仍然无法连接。我能做什么?
my.cnf
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
终端输出:
azure@pinf-vps:~$ sudo lsof -Pni :3306
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mysqld 29117 mysql 15u IPv4 2516519 0t0 TCP 127.0.0.1:3306 (LISTEN)
我还仔细检查了端口是否在VPS和防火墙中打开。
谢谢你的帮助。
在Ubutu 16.04中,您要查找的配置文件的位置是 /etc/mysql/mysql.conf.d/mysqld.cnf
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句