我已经抬头就如何解决这一问题并没有什么工作,到目前为止, 我得到这个错误 无连接可以作出,因为目标机器积极地拒绝它 我使用Linux的每一个教程centos7 mysql版本 mysql版本14.14 Distrib 5.6.32,用于Linux(x86_64)使用EditLine封装 blow is my.cnf 我还必须创建自己的my.cnf,因为当我安装mysql时它没有一个位于我把它放到etc/my.cnf中,它运行的是cnf,因为它将mysql从严格模式中取出。的MySQL连接被拒绝
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.
[mysqld]
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
# These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
# port = .....
# server_id = .....
# socket = .....
bind-address = 0.0.0.0
#skip-networking
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
sql_mode=NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
你能否提供一点细节。您是否试图通过MySQL客户端(或其他软件)或远程访问本地计算机? – cherrysoft
〜我试图通过我的网站使用php连接到mysql,但说警告:mysqli :: mysqli():(HY000/2002):由于目标机器主动拒绝,无法建立连接。在第8行的C:\ xampp \ htdocs \ test.php中 连接失败:由于目标机器主动拒绝连接,因此无法建立连接。 –