Allow socket and address/port to be used with maxadmin
It's now possible to use both a Unix domain socket and host/port when connecting with MaxAdmin to MaxScale. By default MaxAdmin will attempt to use the default Unix domain socket, but if host and/or port has been specified, then an inet socket will be used. maxscaled will authenticate the connection attempt differently depending on whether a Unix domain socket is used or not. If a Unix domain socket is used, then the Linux user id will be used for the authorization, otherwise the 1.4.3 username/password handshake will be performed. adminusers has now been extended so that there is one set of functions for local users (connecting locally over a Unix socket) and one set of functions for remote users (connecting locally or remotely over an Inet socket). The local users are stored in the new .../maxscale-users and the remote users in .../passwd. That is, the old users of a 1.4 installation will work as such in 2.0. One difference is that there will be *no* default remote user. That is, remote users will always have to be added manually using a local user. The implementation is shared; the local and remote alternatives use common functions to which the hashtable and filename to be used are forwarded. The commands "[add|remove] user" behave now exactly like they did in 1.4.3, and also all existing users work out of the box. In addition there is now the commands "[enable|disable] account" using which Linux accounts can be enabled for MaxAdmin usage.
This commit is contained in:
@ -117,9 +117,6 @@ The final stage in the configuration is to add the option service which is used
|
||||
protocol=maxscaled
|
||||
socket=default
|
||||
|
||||
**Note**: maxscaled protocol supports only UNIX domain sockets and in the example default is set.
|
||||
Changing it requires maxadmin to use -S with the new path. Default /tmp/maxadmin.sock is for both maxadmin and maxscaled.
|
||||
|
||||
## Starting MariaDB MaxScale
|
||||
|
||||
Upon completion of the configuration process MariaDB MaxScale is ready to be started for the first time. This may either be done manually by running the maxscale command or via the service interface.
|
||||
|
@ -147,9 +147,6 @@ protocol=maxscaled
|
||||
socket=default
|
||||
```
|
||||
|
||||
**Note**: maxscaled protocol supports only UNIX domain sockets and in the example default is set.
|
||||
Changing it requires maxadmin to use -S with the new path. Default /tmp/maxadmin.sock is for both maxadmin and maxscaled.
|
||||
|
||||
## Starting MariaDB MaxScale
|
||||
|
||||
Upon completion of the configuration process MariaDB MaxScale is ready to be started for the first time. This may either be done manually by running the maxscale command or via the service interface.
|
||||
|
@ -174,8 +174,6 @@ service=CLI
|
||||
protocol=maxscaled
|
||||
socket=default
|
||||
```
|
||||
**Note**: maxscaled protocol supports only UNIX domain sockets and in the example default is set.
|
||||
Changing it requires maxadmin to use -S with the new path. Default /tmp/maxadmin.sock is for both maxadmin and maxscaled.
|
||||
|
||||
# Starting MariaDB MaxScale
|
||||
|
||||
|
@ -133,8 +133,6 @@ service=CLI
|
||||
protocol=maxscaled
|
||||
socket=default
|
||||
```
|
||||
**Note**: maxscaled protocol supports only UNIX domain sockets and in the example default is set.
|
||||
Changing it requires maxadmin to use -S with the new path. Default /tmp/maxadmin.sock is for both maxadmin and maxscaled.
|
||||
|
||||
# Starting MariaDB MaxScale
|
||||
|
||||
|
@ -62,8 +62,7 @@ service=AdminInterface
|
||||
protocol=maxscaled
|
||||
socket=default
|
||||
```
|
||||
**Note**: maxscaled protocol supports only UNIX domain sockets and in the example default is set.
|
||||
Changing it requires maxadmin to use -S with the new path. Default /tmp/maxadmin.sock is for both maxadmin and maxscaled.
|
||||
|
||||
## Prepare Nagios configuration files.
|
||||
|
||||
Assuming Nagios installed on a separated server and the plugins are in /usr/lib64/nagios/plugins and configuration files are in /etc/nagios:
|
||||
|
@ -208,7 +208,7 @@ router=cli
|
||||
type=listener
|
||||
service=MaxAdmin Service
|
||||
protocol=maxscaled
|
||||
port=6603
|
||||
socket=default
|
||||
```
|
||||
|
||||
Now we have created the MariaDB MaxScale configuration file and all we need to do is to save
|
||||
|
Reference in New Issue
Block a user