我已經擡頭就如何解決這一問題並沒有什麼工作,到目前爲止, 我得到這個錯誤 無連接可以作出,因爲目標機器積極地拒絕它 我使用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中 連接失敗:由於目標機器主動拒絕連接,因此無法建立連接。 –