2016-08-30 2 views
0

어떻게 MariaDB 10.1에 IPv4 만 수신 대기시킬 수 있습니까? 내가 MariaDB를 설치하고 시작 난생 처음 이상한하지만 사실, 나는 몇 가지 이유에 대한 MariaDB를 다시 설치하고 내를 재부팅 한 후MariaDB 10.1 (centos 7)이 IPv4에서만 청취 할 수 없습니다.

enter image description here

하지만 이상하게 아래의 예제 그림과 같이 올바르게 IPv4의 청취 것을보고 Centos 7 설치, IPv6에서만 듣기 시작한 것 같습니다. 따라서 Galera 클러스터를 작동시킬 수 없습니다 (IPv4 수신 대기 중일 때 제대로 작동했습니다). 그렇다면이 MariaDB가 IPv4에서만 수신 대기하게하려면 어떻게해야합니까? 아래는

(가 이상하게 여전히 동일, Pls는 나는 또한 바인드 주소를 주석을 시도 참고) /etc/my.cnf.d/server.cnf의

[[email protected] ~]# netstat -ntpl | grep sql 
tcp6 0  0 :::3306     :::*   LISTEN  14323/mysqld 

내용이 내 컴퓨터에서 스크린 샷입니다

# 
# These groups are read by MariaDB server. 
# Use it for options that only the server (but not clients) should see 
# 
# See the examples of server my.cnf files in /usr/share/mysql/ 
# 

# this is read by the standalone daemon and embedded servers 
[server] 

# this is only for the mysqld standalone daemon 
[mysqld] 

# 
# * Galera-related settings 
# 
[galera] 
# Mandatory settings 
#wsrep_on=ON 
#wsrep_provider= 
#wsrep_cluster_address= 
#binlog_format=row 
#default_storage_engine=InnoDB 
#innodb_autoinc_lock_mode=2 
# 
# Allow server to accept connections on all interfaces. 
# 
#bind-address=0.0.0.0 
# 
# Optional setting 
#wsrep_slave_threads=1 
#innodb_flush_log_at_trx_commit=0 

# this is only for embedded server 
[embedded] 

# This group is only read by MariaDB servers, not by MySQL. 
# If you use the same .cnf file for MySQL and MariaDB, 
# you can put MariaDB-only options here 
[mariadb] 

# This group is only read by MariaDB-10.1 servers. 
# If you use the same .cnf file for MariaDB of different versions, 
# use this group for options that older servers don't understand 
[mariadb-10.1] 

MariaDB/MySQL 설정이 여기 저기에 흩어져 있다고 나는 덧붙여 야합니다. 위의 바인드 주소는 Galera에 대한 것입니다. 공식 MariaDB 버그 추적기의 정보가 보이지만 심지어 MM

+0

'my.ini'를 게시 할 수 있습니까? 'bind-address'의 값을 확인하고 싶습니다. – Hackerman

+0

감사합니다. Hackerman, OP에 .cnf 파일을 추가했습니다./usr/share/mysql에는 .cnf 파일이 많이 있습니다. mysql.server 파일이나 당신이 참조하고있는 어떤 것이 될 수 있습니까? –

+0

내 실수는'my.cnf'이어야하고'/etc/my.cnf'...so에서 사용할 수 있습니다'less /etc/my.cnf'... 아니면 어쩌면 올바른 파일을 게시하십시오 , 당신은'# bind-address = 0.0.0.0' 라인의 주석 처리를 제거 할 수 있습니다 (단지'#'를 제거하고 서버를 다시 시작하십시오 – Hackerman

답변

0

을 이전의 IPv6를 해제하려고했지만

감사 의 IPv4에서 수신을 표시하지 않습니다 - 그것은 사과, 그래서를 CentOS 7 MariaDB 내 처음 대신 mysql 소프트웨어를 사용하지 않으면 이것이 가능하지 않다고 제안합니다. 예를 들어 다음과 같은 구성 옵션을 설정했는지 확인할 수 있습니다. /etc/my.cnf, 적어도 버전 10.1.21-MariaDB을 사용하는 동안 이 @ Hackerman의 설명에 예상대로 작동합니다.


가 대답하기 :

bind-address=0.0.0.0 

오해/잘못된/무관 공식 버그 추적기 나는에 회피 특정 시나리오와 관련된 질문은 해당 설정이 설정되는 "섹션"으로 이동합니다. 즉, 서버 전체 [mysqld] 섹션이 아닌 [galera] 섹션으로 작성했습니다.

[mysqld] 

# 
# * Galera-related settings 
# 
[galera] 
# Mandatory settings 
#wsrep_on=ON 
#wsrep_provider= 
#wsrep_cluster_address= 
#binlog_format=row 
#default_storage_engine=InnoDB 
#innodb_autoinc_lock_mode=2 
# 
# Allow server to accept connections on all interfaces. 
# 
#bind-address=0.0.0.0 
관련 문제