2016-08-30 20 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だけを聞くようにします。以下の私のマシンからのスクリーンショット/etc/my.cnf.d/server.cnfの

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

内容(Plsは私もバインドアドレスをコメント解除しようとした、それはまだ妙に同じであることに注意してください)

です
# 
# 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のためのものです。私も以前のIPv6を無効にすることを試みたが、公式MariaDBのバグトラッカーの情報がようですが、それがIPv4でリッスン

おかげ MM

+0

あなたの 'my.ini'を投稿できますか?私はバインドアドレスの値を確認したい – Hackerman

+0

ありがとうハッカーマン、私は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

が表示されない - 謝罪ので、それは、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 
関連する問題