FreeBSD Mysql 2003-无法连接到“本地主机”上的MySQL服务器(10061)

时间:2019-11-05 23:25:48

标签: mysql freebsd

MySQL正在运行,已通过服务mysql-server状态验证。

这是我的配置文件(/etc/my.cnf):

[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/English
#bind-address = 127.0.0.1
#skip-networking

3306已打开(sockstat -4 -l):

USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
root     sendmail   749   4  tcp4   127.0.0.1:25          *:*
root     sshd       746   4  tcp4   *:22                  *:*
mysql    mysqld     714   10 tcp46  *:3306                *:*
root     syslogd    424   7  udp4   *:514                 *:*

mysql.user用户根主机的主机设置为通配符%

有什么想法我还能做什么?

1 个答案:

答案 0 :(得分:0)

感谢王先生,问题已解决。如何将这个问题标记为已解决?