2017-02-28 30 views
0

我運行Ubuntu 16.04與MariaDB的啓動MariaDB的MaxScale服務,無法在Ubuntu的

而且我已經下載maxscale的官方網站上,安裝

https://downloads.mariadb.com/MaxScale/2.0.4/ubuntu/dists/xenial/main/binary-amd64/maxscale-2.0.4-1.ubuntu.xenial.x86_64.deb

現在我無法啓動服務,不太有幫助

2017-02-28 11:41:11 notice : Working directory: /var/log/maxscale 
2017-02-28 11:41:11 notice : MariaDB MaxScale 2.0.4 started 
2017-02-28 11:41:11 notice : MaxScale is running in process 21493 
2017-02-28 11:41:11 notice : Configuration file: /etc/maxscale.cnf 
2017-02-28 11:41:11 notice : Log directory: /var/log/maxscale 
2017-02-28 11:41:11 notice : Data directory: /var/lib/maxscale 
2017-02-28 11:41:11 notice : Module directory: /usr/lib/x86_64-linux-gnu/maxscale 
2017-02-28 11:41:11 notice : Service cache: /var/cache/maxscale 
2017-02-28 11:41:11 notice : No query classifier specified, using default 'qc_sqlite'. 
2017-02-28 11:41:11 notice : Loaded module qc_sqlite: V1.0.0 from /usr/lib/x86_64-linux-gnu/maxscale/libqc_sqlite.so 
2017-02-28 11:41:11 error : Failed to start all MaxScale services. Exiting. 
2017-02-28 11:41:11 MaxScale is shut down. 

/etc/maxscale.cnf

[maxscale] 
threads=1 

[server1] 
type=server 
address=127.0.0.1 
port=3306 
protocol=MySQLBackend 

任何想法?

回答

2

它無法啓動的原因是因爲您沒有定義服務。雖然這是在錯誤消息解釋,這不是很容易解釋:2017-02-28 11:41:11 error : Failed to start all MaxScale services. Exiting.

嘗試增加以下三個對象到您的配置:

[Read-Connection-Router] 
type=service 
router=readconnroute 
servers=server1 
user=maxuser 
passwd=maxpwd 

[Read-Connection-Listener] 
type=listener 
service=Read-Connection-Router 
protocol=MySQLClient 
port=4008 

[MySQL-Monitor] 
type=monitor 
module=mysqlmon 
servers=server1 
user=maxuser 
passwd=maxpwd 
monitor_interval=1000 

Read-Connection-Router是MaxScale提供服務。 Read-Connection-Listener是客戶端可以連接的網絡端口,並鏈接到以前定義的服務。最後一個對象MySQL-Monitor是主動監視數據庫服務器狀態的數據庫監視器。

配置中定義的mysqlmon模塊用於標準主從複製集羣。如果您使用的是Galera羣集,則需要使用galeramon模塊。