Chaged MaxScale default installation directory to /usr/local/mariadb/maxscale and MaxAdmin password to 'mariadb'.

This commit is contained in:
Markus Makela
2015-03-23 14:53:31 +02:00
parent 1680337f40
commit 7cfc1d3cc9
36 changed files with 148 additions and 148 deletions

View File

@ -12,7 +12,7 @@ enable_testing()
set_variables() set_variables()
set_maxscale_version() set_maxscale_version()
set(CMAKE_INSTALL_PREFIX "/usr/local/skysql/maxscale" CACHE PATH "Prefix prepended to install directories.") set(CMAKE_INSTALL_PREFIX "/usr/local/mariadb/maxscale" CACHE PATH "Prefix prepended to install directories.")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")

View File

@ -136,5 +136,5 @@ Both RPM and Debian packages are available for MaxScale in addition to the tar b
# MaxScale Home Default Value # MaxScale Home Default Value
The installation assumes that the default value for the environment variable MAXSCALE_HOME is set to /usr/local/skysql/maxscale. This is hard coded in the service startup file that is placed in /etc/init.d/maxscale by the installation process. The installation assumes that the default value for the environment variable MAXSCALE_HOME is set to /usr/local/mariadb/maxscale. This is hard coded in the service startup file that is placed in /etc/init.d/maxscale by the installation process.

View File

@ -1,25 +1,25 @@
Installation and startup Installation and startup
Untar the binary distribution in the desired location, Untar the binary distribution in the desired location,
e.g. /usr/local/skysql e.g. /usr/local/mariadb
Alternatively build from the source code using the instructions Alternatively build from the source code using the instructions
in the README file and execute make install. in the README file and execute make install.
Simply set the environment variable MAXSCALE_HOME to point to the Simply set the environment variable MAXSCALE_HOME to point to the
MaxScale directory, found inside the path into which the files have been copied, MaxScale directory, found inside the path into which the files have been copied,
e.g. MAXSCALE_HOME=/usr/local/skysql/maxscale/MaxScale e.g. MAXSCALE_HOME=/usr/local/mariadb/maxscale
Also you will need to optionaly set LD_LIBRARY_PATH to include the 'lib' folder, Also you will need to optionaly set LD_LIBRARY_PATH to include the 'lib' folder,
found inside the path into which the files have been copied, found inside the path into which the files have been copied,
e.g. LD_LIBRARY_PATH=/usr/local/skysql/maxscale/lib e.g. LD_LIBRARY_PATH=/usr/local/mariadb/maxscale/lib
Because we need the libmysqld library for parsing we must create a Because we need the libmysqld library for parsing we must create a
valid my.cnf file to enable the library to be used. Copy the my.cnf valid my.cnf file to enable the library to be used. Copy the my.cnf
to $MAXSCALE_HOME/mysql/my.cnf. to $MAXSCALE_HOME/mysql/my.cnf.
To start MaxScale execute the command 'maxscale' from the bin folder, To start MaxScale execute the command 'maxscale' from the bin folder,
e.g. /usr/local/skysql/maxscale/bin/maxscale e.g. /usr/local/mariadb/maxscale/bin/maxscale
Configuration Configuration
@ -30,8 +30,8 @@ various services.
In order to view the internal activity of the gateway you can telnet to In order to view the internal activity of the gateway you can telnet to
the port defined for the telnet listener. Initially you may login with the port defined for the telnet listener. Initially you may login with
the user name of "admin" and the password "skysql". Once connected type the user name of "admin" and the password "mariadb". Once connected type
help for an overview of the commands and help <command> for the more help for an overview of the commands and help <command> for the more
detailed help on commands. Use the add user command to add a new user, detailed help on commands. Use the add user command to add a new user,
this will also remove the admin/skysql user. this will also remove the admin/mariadb user.

View File

@ -171,7 +171,7 @@ After the completion of the make process the installation can be achieved by run
This will result in an installation being created which is identical to that which would be achieved by installing the binary package. The only difference is that init.d scripts aren't installed and the RabbitMQ components are not built. This will result in an installation being created which is identical to that which would be achieved by installing the binary package. The only difference is that init.d scripts aren't installed and the RabbitMQ components are not built.
By default, MaxScale installs to '/usr/local/skysql/maxscale' and places init.d scripts and ldconfig files into their folders. Change the CMAKE_INSTALL_PREFIX variable to your desired installation directory and set INSTALL_SYSTEM_FILES=N to prevent the init.d script and ldconfig file installation. By default, MaxScale installs to '/usr/local/mariadb/maxscale' and places init.d scripts and ldconfig files into their folders. Change the CMAKE_INSTALL_PREFIX variable to your desired installation directory and set INSTALL_SYSTEM_FILES=N to prevent the init.d script and ldconfig file installation.
Other useful targets for Make are `documentation`, which generates the Doxygen documentation, and `uninstall` which uninstall MaxScale binaries after an install. Other useful targets for Make are `documentation`, which generates the Doxygen documentation, and `uninstall` which uninstall MaxScale binaries after an install.

View File

@ -514,7 +514,7 @@ Default value is `2`. Write Timeout is the timeout in seconds for each attempt t
# Protocol Modules # Protocol Modules
The protocols supported by MaxScale are implemented as external modules that are loaded dynamically into the MaxScale core. These modules reside in the directory `$MAXSCALE_HOME/modules`, if the environment variable `$MAXSCALE_HOME` is not set it defaults to `/usr/local/skysql/MaxScale`. It may also be set by passing the `-c` option on the MaxScale command line. The protocols supported by MaxScale are implemented as external modules that are loaded dynamically into the MaxScale core. These modules reside in the directory `$MAXSCALE_HOME/modules`, if the environment variable `$MAXSCALE_HOME` is not set it defaults to `/usr/local/mariadb/MaxScale`. It may also be set by passing the `-c` option on the MaxScale command line.
## MySQLClient ## MySQLClient
@ -905,7 +905,7 @@ protocol=telnetd
port=4442 port=4442
``` ```
Connections using the telnet protocol to port 4442 of the MaxScale host will result in a new debug CLI session. A default username and password are used for this module, new users may be created using the add user command. As soon as any users are explicitly created the default username will no longer continue to work. The default username is admin with a password of skysql. Connections using the telnet protocol to port 4442 of the MaxScale host will result in a new debug CLI session. A default username and password are used for this module, new users may be created using the add user command. As soon as any users are explicitly created the default username will no longer continue to work. The default username is admin with a password of mariadb.
The debugcli supports two modes of operation, `developer` and `user`. The mode is set via the `router_options` parameter. The user mode is more suited to end-users and administrators, whilst the develop mode is explicitly targeted to software developing adding or maintaining the MaxScale code base. Details of the differences between the modes can be found in the debugging guide for MaxScale. The default is `user` mode. The following service definition would enable a developer version of the debugcli. The debugcli supports two modes of operation, `developer` and `user`. The mode is set via the `router_options` parameter. The user mode is more suited to end-users and administrators, whilst the develop mode is explicitly targeted to software developing adding or maintaining the MaxScale code base. Details of the differences between the modes can be found in the debugging guide for MaxScale. The default is `user` mode. The following service definition would enable a developer version of the debugcli.

View File

@ -65,7 +65,7 @@ modules it will search using a predescribed search path. The rules are:
1. Look in the current directory for the module 1. Look in the current directory for the module
2. Look in $MAXSCALE_HOME/modules 2. Look in $MAXSCALE_HOME/modules
3. Look in /usr/local/skysql/maxscale/modules 3. Look in /usr/local/mariadb/maxscale/modules
Configuration is read by default from the file \$MAXSCALE_HOME/etc/MaxScale.cnf, /etc/MaxScale.cnf. An example file is included in in the installation and can be found in the etc/ folder within the MaxScale installation. The default value of MAXSCALE_HOME can be overriden by using the -c flag on the command line. This should be immediately followed by the path to the MaxScale home directory. The -f flag can be used on the command line to set the name and the location of the configuration file. Without path expression the file is read from \$MAXSCALE_HOME/etc directory. Configuration is read by default from the file \$MAXSCALE_HOME/etc/MaxScale.cnf, /etc/MaxScale.cnf. An example file is included in in the installation and can be found in the etc/ folder within the MaxScale installation. The default value of MAXSCALE_HOME can be overriden by using the -c flag on the command line. This should be immediately followed by the path to the MaxScale home directory. The -f flag can be used on the command line to set the name and the location of the configuration file. Without path expression the file is read from \$MAXSCALE_HOME/etc directory.

View File

@ -354,7 +354,7 @@ Connected to localhost.
Escape character is '^]'. Escape character is '^]'.
Welcome the SkySQL MaxScale Debug Interface (V1.1.0). Welcome the Mariadb MaxScale Debug Interface (V1.1.0).
Type help for a list of available commands. Type help for a list of available commands.
@ -364,7 +364,7 @@ Password:
MaxScale> MaxScale>
As delivered MaxScale uses a default login name of admin with the password of skysql for connections to the debug interface. Users may be added to the CLI by use of the add user command. As delivered MaxScale uses a default login name of admin with the password of mariadb for connections to the debug interface. Users may be added to the CLI by use of the add user command.
This places you in the debug command line interface of MaxScale, there is a help system that will display the commands available to you This places you in the debug command line interface of MaxScale, there is a help system that will display the commands available to you
@ -1691,7 +1691,7 @@ Note, not all configuration elements can be changed dynamically currently. This
## Add user ## Add user
The add user command is used to add new users to the debug CLI of MaxScale. The default behaviour of the CLI for MaxScale is to have a login name of admin and a fixed password of skysql. Adding new users will disable this default behaviour and limit the login access to the users that are added. The add user command is used to add new users to the debug CLI of MaxScale. The default behaviour of the CLI for MaxScale is to have a login name of admin and a fixed password of mariadb. Adding new users will disable this default behaviour and limit the login access to the users that are added.
**MaxScale>** add user admin july2013 **MaxScale>** add user admin july2013
@ -1711,7 +1711,7 @@ User admin already exists.
**MaxScale>**** ** **MaxScale>**** **
If you should forget or lose the the account details you may simply remove the passwd file in $MAXSCALE_HOME/etc and the system will revert to the default behaviour with admin/skysql as the account. If you should forget or lose the the account details you may simply remove the passwd file in $MAXSCALE_HOME/etc and the system will revert to the default behaviour with admin/mariadb as the account.
## Enable/disable log ## Enable/disable log

View File

@ -650,7 +650,7 @@ A monitor that has been shutdown may be restarted using the restart monitor comm
# Working With Administration Interface Users # Working With Administration Interface Users
A default installation of MaxScale allows connection to the administration interface using the username of admin and the password skysql. This username and password stay in effect as long as no other users have been created for the administration interface. As soon as the first user is added the use of admin/skysql as login credentials will be disabled. A default installation of MaxScale allows connection to the administration interface using the username of admin and the password mariadb. This username and password stay in effect as long as no other users have been created for the administration interface. As soon as the first user is added the use of admin/mariadb as login credentials will be disabled.
## What Users Have Been Defined? ## What Users Have Been Defined?
@ -666,7 +666,7 @@ In order to see the current users that have been defined for the administration
User names: vilho, root, dba, massi, mark User names: vilho, root, dba, massi, mark
MaxScale> MaxScale>
Please note that if no users have been configured the default admin/skysql user will not be shown. Please note that if no users have been configured the default admin/mariadb user will not be shown.
MaxScale> show users MaxScale> show users
Administration interface users: Administration interface users:

View File

@ -80,7 +80,7 @@ A number of bug fixes have been applied between the 1.0.5 GA and this RC release
</tr> </tr>
<tr> <tr>
<td>709</td> <td>709</td>
<td>"COPYRIGHT LICENSE README SETUP" files go to /usr/local/skysql/maxscale/ after 'make package'</td> <td>"COPYRIGHT LICENSE README SETUP" files go to /usr/local/mariadb/maxscale/ after 'make package'</td>
</tr> </tr>
<tr> <tr>
<td>704</td> <td>704</td>

View File

@ -22,7 +22,7 @@ or
$ /etc/init.d/maxscale start $ /etc/init.d/maxscale start
It is also possible to start MaxScale by executing the maxscale command itself, in this case you must ensure that the environment is correctly setup or command line options are passed. The major elements to consider are the correct setting of the MAXSCALE\_HOME directory and to ensure that LD\_LIBRARY\_PATH. The LD\_LIBRARY\_PATH should include the lib directory that was installed as part of the MaxScale installation, the MAXSCALE\_HOME should point to /usr/local/skysql/maxscale if a default installation has been created or to the directory this was relocated to. Running the executable $MAXSCALE\_HOME/bin/maxscale will result in MaxScale running as a daemon process, unattached to the terminal in which it was started and using configuration files that it finds in the $MAXSCALE\_HOME directory. It is also possible to start MaxScale by executing the maxscale command itself, in this case you must ensure that the environment is correctly setup or command line options are passed. The major elements to consider are the correct setting of the MAXSCALE\_HOME directory and to ensure that LD\_LIBRARY\_PATH. The LD\_LIBRARY\_PATH should include the lib directory that was installed as part of the MaxScale installation, the MAXSCALE\_HOME should point to /usr/local/mariadb/maxscale if a default installation has been created or to the directory this was relocated to. Running the executable $MAXSCALE\_HOME/bin/maxscale will result in MaxScale running as a daemon process, unattached to the terminal in which it was started and using configuration files that it finds in the $MAXSCALE\_HOME directory.
Options may be passed to the MaxScale binary that alter this default behaviour, this options are documented in the table below. Options may be passed to the MaxScale binary that alter this default behaviour, this options are documented in the table below.
@ -83,14 +83,14 @@ MaxScale will also stop gracefully if it received a hangup signal, to find the p
In order to shutdown MaxScale using the maxadmin command you may either connect with maxadmin in interactive mode or pass the "shutdown maxscale" command you wish to execute as an argument to maxadmin. In order to shutdown MaxScale using the maxadmin command you may either connect with maxadmin in interactive mode or pass the "shutdown maxscale" command you wish to execute as an argument to maxadmin.
$ maxadmin -pskysql shutdown maxscale $ maxadmin -pmariadb shutdown maxscale
<a name="checking"></a> <a name="checking"></a>
### Checking The Status Of The MaxScale Services ### Checking The Status Of The MaxScale Services
It is possible to use the maxadmin command to obtain statistics regarding the services that are configured within your MaxScale configuration file. The maxadmin command "list services" will give very basic information regarding the services that are define. This command may be either run in interactive mode or passed on the maxadmin command line. It is possible to use the maxadmin command to obtain statistics regarding the services that are configured within your MaxScale configuration file. The maxadmin command "list services" will give very basic information regarding the services that are define. This command may be either run in interactive mode or passed on the maxadmin command line.
$ maxadmin -pskysql $ maxadmin -pmariadb
MaxScale> list services MaxScale> list services
Services. Services.
@ -118,7 +118,7 @@ It should be noted that network listeners count as a user of the service, theref
To determine what client are currently connected to MaxScale you can use the "list clients" command within maxadmin. This will give you IP address and the ID’s of the DCB and session for that connection. As with any maxadmin command this can be passed on the command line or typed interactively in maxadmin. To determine what client are currently connected to MaxScale you can use the "list clients" command within maxadmin. This will give you IP address and the ID’s of the DCB and session for that connection. As with any maxadmin command this can be passed on the command line or typed interactively in maxadmin.
$ maxadmin -pskysql list clients $ maxadmin -pmariadb list clients
Client Connections Client Connections
@ -141,11 +141,11 @@ MaxScale write log data into four log files with varying degrees of detail. With
It is possible to rotate either a single log file or all the log files with a single command. When the logfile is rotated, the current log file is closed and a new log file, with an increased sequence number in its name, is created. Log file rotation is achieved by use of the "flush log" or “flush logs” command in maxadmin. It is possible to rotate either a single log file or all the log files with a single command. When the logfile is rotated, the current log file is closed and a new log file, with an increased sequence number in its name, is created. Log file rotation is achieved by use of the "flush log" or “flush logs” command in maxadmin.
$ maxadmin -pskysql flush logs $ maxadmin -pmariadb flush logs
Flushes all of the logs, whereas an individual log may be flushed with the "flush log" command. Flushes all of the logs, whereas an individual log may be flushed with the "flush log" command.
$ maxadmin -pskysql $ maxadmin -pmariadb
MaxScale> flush log error MaxScale> flush log error
MaxScale> flush log trace MaxScale> flush log trace
MaxScale> MaxScale>
@ -154,7 +154,7 @@ This may be integrated into the Linux logrotate mechanism by adding a configurat
<table> <table>
<tr> <tr>
<td>/usr/local/skysql/maxscale/log/*.log { <td>/usr/local/mariadb/maxscale/log/*.log {
monthly monthly
rotate 5 rotate 5
missingok missingok
@ -163,7 +163,7 @@ sharedscripts
postrotate postrotate
\# run if maxscale is running \# run if maxscale is running
if test -n "`ps acx|grep maxscale`"; then if test -n "`ps acx|grep maxscale`"; then
/usr/local/skysql/maxscale/bin/maxadmin -pskysql flush logs /usr/local/mariadb/maxscale/bin/maxadmin -pmariadb flush logs
fi fi
endscript endscript
}</td> }</td>
@ -175,14 +175,14 @@ One disadvantage with this is that the password used for the maxadmin command ha
<table> <table>
<tr> <tr>
<td>/usr/local/skysql/maxscale/log/*.log { <td>/usr/local/mariadb/maxscale/log/*.log {
monthly monthly
rotate 5 rotate 5
missingok missingok
nocompress nocompress
sharedscripts sharedscripts
postrotate postrotate
kill -USR1 `cat /usr/local/skysql/maxscale/log/maxscale.pid` kill -USR1 `cat /usr/local/mariadb/maxscale/log/maxscale.pid`
endscript endscript
}</td> }</td>
</tr> </tr>

View File

@ -60,7 +60,7 @@ If you wish to use two different usernames for the two different roles of monito
### Creating Your MaxScale Configuration ### Creating Your MaxScale Configuration
MaxScale configuration is held in an ini file that is located in the file MaxScale.cnf in the directory $MAXSCALE_HOME/etc, if you have installed in the default location then this file is available in /usr/local/skysql/maxscale/etc/MaxScale.cnf. This is not created as part of the installation process and must be manually created. A template file does exist within this directory that may be use as a basis for your configuration. MaxScale configuration is held in an ini file that is located in the file MaxScale.cnf in the directory $MAXSCALE_HOME/etc, if you have installed in the default location then this file is available in /usr/local/mariadb/maxscale/etc/MaxScale.cnf. This is not created as part of the installation process and must be manually created. A template file does exist within this directory that may be use as a basis for your configuration.
A global, maxscale, section is included within every MaxScale configuration file; this is used to set the values of various MaxScale wide parameters, perhaps the most important of these is the number of threads that MaxScale will use to execute the code that forwards requests and handles responses for clients. A global, maxscale, section is included within every MaxScale configuration file; this is used to set the values of various MaxScale wide parameters, perhaps the most important of these is the number of threads that MaxScale will use to execute the code that forwards requests and handles responses for clients.
@ -89,7 +89,7 @@ In order to instruct the router to which servers it should route we must add rou
The final step in the service section is to add the username and password that will be used to populate the user data from the database cluster. There are two options for representing the password, either plain text or encrypted passwords may be used. In order to use encrypted passwords a set of keys must be generated that will be used by the encryption and decryption process. To generate the keys use the maxkeys command and pass the name of the secrets file in which the keys are stored. The final step in the service section is to add the username and password that will be used to populate the user data from the database cluster. There are two options for representing the password, either plain text or encrypted passwords may be used. In order to use encrypted passwords a set of keys must be generated that will be used by the encryption and decryption process. To generate the keys use the maxkeys command and pass the name of the secrets file in which the keys are stored.
% maxkeys /usr/local/skysql/maxscale/etc/.secrets % maxkeys /usr/local/mariadb/maxscale/etc/.secrets
% %
Once the keys have been created the maxpasswd command can be used to generate the encrypted password. Once the keys have been created the maxpasswd command can be used to generate the encrypted password.
@ -178,9 +178,9 @@ or
% service maxscale start % service maxscale start
Check the error log in /usr/local/skysql/maxscale/log to see if any errors are detected in the configuration file and to confirm MaxScale has been started. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured. Check the error log in /usr/local/mariadb/maxscale/log to see if any errors are detected in the configuration file and to confirm MaxScale has been started. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured.
% maxadmin -pskysql list services % maxadmin -pmariadb list services
Services. Services.
--------------------------+----------------------+--------+--------------- --------------------------+----------------------+--------+---------------
@ -189,7 +189,7 @@ Check the error log in /usr/local/skysql/maxscale/log to see if any errors are d
Galera Service | readconnroute | 1 | 1 Galera Service | readconnroute | 1 | 1
CLI | cli | 2 | 2 CLI | cli | 2 | 2
--------------------------+----------------------+--------+--------------- --------------------------+----------------------+--------+---------------
% maxadmin -pskysql list servers % maxadmin -pmariadb list servers
Servers. Servers.
-------------------+-----------------+-------+-------------+------------------- -------------------+-----------------+-------+-------------+-------------------
Server | Address | Port | Connections | Status Server | Address | Port | Connections | Status
@ -201,7 +201,7 @@ Check the error log in /usr/local/skysql/maxscale/log to see if any errors are d
A Galera Cluster is a multi-master clustering technology, however the monitor is able to impose false notions of master and slave roles within a Galera Cluster in order to facilitate the use of Galera as if it were a standard MySQL Replication setup. This is merely an internal MaxScale convenience and has no impact on the behaviour of the cluster. A Galera Cluster is a multi-master clustering technology, however the monitor is able to impose false notions of master and slave roles within a Galera Cluster in order to facilitate the use of Galera as if it were a standard MySQL Replication setup. This is merely an internal MaxScale convenience and has no impact on the behaviour of the cluster.
% maxadmin -pskysql list listeners % maxadmin -pmariadb list listeners
Listeners. Listeners.
---------------------+--------------------+-----------------+-------+-------- ---------------------+--------------------+-----------------+-------+--------

View File

@ -62,7 +62,7 @@ If you wish to use two different usernames for the two different roles of monito
### Creating Your MaxScale Configuration ### Creating Your MaxScale Configuration
MaxScale configuration is held in an ini file that is located in the file MaxScale.cnf in the directory $MAXSCALE_HOME/etc, if you have installed in the default location then this file is available in /usr/local/skysql/maxscale/etc/MaxScale.cnf. This is not created as part of the installation process and must be manually created. A template file does exist within this directory that may be use as a basis for your configuration. MaxScale configuration is held in an ini file that is located in the file MaxScale.cnf in the directory $MAXSCALE_HOME/etc, if you have installed in the default location then this file is available in /usr/local/mariadb/maxscale/etc/MaxScale.cnf. This is not created as part of the installation process and must be manually created. A template file does exist within this directory that may be use as a basis for your configuration.
A global, maxscale, section is included within every MaxScale configuration file; this is used to set the values of various MaxScale wide parameters, perhaps the most important of these is the number of threads that MaxScale will use to execute the code that forwards requests and handles responses for clients. A global, maxscale, section is included within every MaxScale configuration file; this is used to set the values of various MaxScale wide parameters, perhaps the most important of these is the number of threads that MaxScale will use to execute the code that forwards requests and handles responses for clients.
@ -83,7 +83,7 @@ The router for we need to use for this configuration is the readwritesplit modul
The final step in the service sections is to add the username and password that will be used to populate the user data from the database cluster. There are two options for representing the password, either plain text or encrypted passwords may be used. In order to use encrypted passwords a set of keys must be generated that will be used by the encryption and decryption process. To generate the keys use the maxkeys command and pass the name of the secrets file in which the keys are stored. The final step in the service sections is to add the username and password that will be used to populate the user data from the database cluster. There are two options for representing the password, either plain text or encrypted passwords may be used. In order to use encrypted passwords a set of keys must be generated that will be used by the encryption and decryption process. To generate the keys use the maxkeys command and pass the name of the secrets file in which the keys are stored.
% maxkeys /usr/local/skysql/maxscale/etc/.secrets % maxkeys /usr/local/mariadb/maxscale/etc/.secrets
% %
Once the keys have been created the maxpasswd command can be used to generate the encrypted password. Once the keys have been created the maxpasswd command can be used to generate the encrypted password.
@ -183,9 +183,9 @@ or
% service maxscale start % service maxscale start
Check the error log in /usr/local/skysql/maxscale/log to see if any errors are detected in the configuration file and to confirm MaxScale has been started. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured. Check the error log in /usr/local/mariadb/maxscale/log to see if any errors are detected in the configuration file and to confirm MaxScale has been started. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured.
% maxadmin -pskysql list services % maxadmin -pmariadb list services
Services. Services.
--------------------------+----------------------+--------+--------------- --------------------------+----------------------+--------+---------------
@ -195,7 +195,7 @@ Check the error log in /usr/local/skysql/maxscale/log to see if any errors are d
CLI | cli | 2 | 2 CLI | cli | 2 | 2
--------------------------+----------------------+--------+--------------- --------------------------+----------------------+--------+---------------
% maxadmin -pskysql list servers % maxadmin -pmariadb list servers
Servers. Servers.
-------------------+-----------------+-------+-------------+-------------------- -------------------+-----------------+-------+-------------+--------------------
Server | Address | Port | Connections | Status Server | Address | Port | Connections | Status
@ -207,7 +207,7 @@ Check the error log in /usr/local/skysql/maxscale/log to see if any errors are d
A Galera Cluster is a multi-master clustering technology, however the monitor is able to impose false notions of master and slave roles within a Galera Cluster in order to facilitate the use of Galera as if it were a standard MySQL Replication setup. This is merely an internal MaxScale convenience and has no impact on the behaviour of the cluster but does allow the monitor to create these pseudo roles which are utilised by the Read/Write Splitter. A Galera Cluster is a multi-master clustering technology, however the monitor is able to impose false notions of master and slave roles within a Galera Cluster in order to facilitate the use of Galera as if it were a standard MySQL Replication setup. This is merely an internal MaxScale convenience and has no impact on the behaviour of the cluster but does allow the monitor to create these pseudo roles which are utilised by the Read/Write Splitter.
% maxadmin -pskysql list listeners % maxadmin -pmariadb list listeners
Listeners. Listeners.
---------------------+--------------------+-----------------+-------+-------- ---------------------+--------------------+-----------------+-------+--------

View File

@ -249,7 +249,7 @@ Add these sections in MaxScale.cnf config file:
Assuming MaxScale is installed in server1, start it Assuming MaxScale is installed in server1, start it
[root@server1 ~]# cd /usr/local/skysql/maxscale/bin [root@server1 ~]# cd /usr/local/mariadb/maxscale/bin
[root@server1 bin]# ./maxscale -c ../ [root@server1 bin]# ./maxscale -c ../

View File

@ -70,7 +70,7 @@ If you wish to use two different usernames for the two different roles of monito
## Creating Your MaxScale Configuration ## Creating Your MaxScale Configuration
MaxScale configuration is held in an ini file that is located in the file MaxScale.cnf in the directory $MAXSCALE_HOME/etc, if you have installed in the default location then this file is available in /usr/local/skysql/maxscle/etc/MaxScale.cnf. This is not created as part of the installation process and must be manually created. A template file does exist within this directory that may be use as a basis for your configuration. MaxScale configuration is held in an ini file that is located in the file MaxScale.cnf in the directory $MAXSCALE_HOME/etc, if you have installed in the default location then this file is available in /usr/local/mariadb/maxscle/etc/MaxScale.cnf. This is not created as part of the installation process and must be manually created. A template file does exist within this directory that may be use as a basis for your configuration.
A global, maxscale, section is included within every MaxScale configuration file; this is used to set the values of various MaxScale wide parameters, perhaps the most important of these is the number of threads that MaxScale will use to execute the code that forwards requests and handles responses for clients. A global, maxscale, section is included within every MaxScale configuration file; this is used to set the values of various MaxScale wide parameters, perhaps the most important of these is the number of threads that MaxScale will use to execute the code that forwards requests and handles responses for clients.
@ -130,7 +130,7 @@ servers=dbserv1, dbserv2, dbserv3
The final step in the service sections is to add the username and password that will be used to populate the user data from the database cluster. There are two options for representing the password, either plain text or encrypted passwords may be used. In order to use encrypted passwords a set of keys must be generated that will be used by the encryption and decryption process. To generate the keys use the maxkeys command and pass the name of the secrets file in which the keys are stored. The final step in the service sections is to add the username and password that will be used to populate the user data from the database cluster. There are two options for representing the password, either plain text or encrypted passwords may be used. In order to use encrypted passwords a set of keys must be generated that will be used by the encryption and decryption process. To generate the keys use the maxkeys command and pass the name of the secrets file in which the keys are stored.
% maxkeys /usr/local/skysql/maxscale/etc/.secrets % maxkeys /usr/local/mariadb/maxscale/etc/.secrets
% %
@ -292,9 +292,9 @@ or
% service maxscale start % service maxscale start
Check the error log in /usr/local/skysql/maxscale/log to see if any errors are detected in the configuration file and to confirm MaxScale has been started. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured. Check the error log in /usr/local/mariadb/maxscale/log to see if any errors are detected in the configuration file and to confirm MaxScale has been started. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured.
% maxadmin -pskysql list services % maxadmin -pmariadb list services
Services. Services.
@ -312,7 +312,7 @@ CLI | cli | 2 | 2
--------------------------+----------------------+--------+--------------- --------------------------+----------------------+--------+---------------
% maxadmin -pskysql list servers % maxadmin -pmariadb list servers
Servers. Servers.
@ -330,7 +330,7 @@ dbserv3 | 192.168.2.3 | 3306 | 0 | Running, Slave
-------------------+-----------------+-------+-------------+-------------------- -------------------+-----------------+-------+-------------+--------------------
% maxadmin -pskysql list listeners % maxadmin -pmariadb list listeners
Listeners. Listeners.

View File

@ -70,7 +70,7 @@ If you wish to use two different usernames for the two different roles of monito
## Creating Your MaxScale Configuration ## Creating Your MaxScale Configuration
MaxScale configuration is held in an ini file that is located in the file MaxScale.cnf in the directory $MAXSCALE_HOME/etc, if you have installed in the default location then this file is available in /usr/local/skysql/maxscale/etc/MaxScale.cnf. This is not created as part of the installation process and must be manually created. A template file does exist within this directory that may be use as a basis for your configuration. MaxScale configuration is held in an ini file that is located in the file MaxScale.cnf in the directory $MAXSCALE_HOME/etc, if you have installed in the default location then this file is available in /usr/local/mariadb/maxscale/etc/MaxScale.cnf. This is not created as part of the installation process and must be manually created. A template file does exist within this directory that may be use as a basis for your configuration.
A global, maxscale, section is included within every MaxScale configuration file; this is used to set the values of various MaxScale wide parameters, perhaps the most important of these is the number of threads that MaxScale will use to execute the code that forwards requests and handles responses for clients. A global, maxscale, section is included within every MaxScale configuration file; this is used to set the values of various MaxScale wide parameters, perhaps the most important of these is the number of threads that MaxScale will use to execute the code that forwards requests and handles responses for clients.
@ -96,7 +96,7 @@ servers=dbserv1, dbserv2, dbserv3
The final step in the service sections is to add the username and password that will be used to populate the user data from the database cluster. There are two options for representing the password, either plain text or encrypted passwords may be used. In order to use encrypted passwords a set of keys must be generated that will be used by the encryption and decryption process. To generate the keys use the maxkeys command and pass the name of the secrets file in which the keys are stored. The final step in the service sections is to add the username and password that will be used to populate the user data from the database cluster. There are two options for representing the password, either plain text or encrypted passwords may be used. In order to use encrypted passwords a set of keys must be generated that will be used by the encryption and decryption process. To generate the keys use the maxkeys command and pass the name of the secrets file in which the keys are stored.
% maxkeys /usr/local/skysql/maxscale/etc/.secrets % maxkeys /usr/local/mariadb/maxscale/etc/.secrets
% %
@ -226,9 +226,9 @@ or
% service maxscale start % service maxscale start
Check the error log in /usr/local/skysql/maxscale/log to see if any errors are detected in the configuration file and to confirm MaxScale has been started. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured. Check the error log in /usr/local/mariadb/maxscale/log to see if any errors are detected in the configuration file and to confirm MaxScale has been started. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured.
% maxadmin -pskysql list services % maxadmin -pmariadb list services
Services. Services.
@ -244,7 +244,7 @@ CLI | cli | 2 | 2
--------------------------+----------------------+--------+--------------- --------------------------+----------------------+--------+---------------
% maxadmin -pskysql list servers % maxadmin -pmariadb list servers
Servers. Servers.
@ -262,7 +262,7 @@ dbserv3 | 192.168.2.3 | 3306 | 0 | Running, Slave
-------------------+-----------------+-------+-------------+-------------------- -------------------+-----------------+-------+-------------+--------------------
% maxadmin -pskysql list listeners % maxadmin -pmariadb list listeners
Listeners. Listeners.

View File

@ -73,9 +73,9 @@ and add (just after localhost.cfg or commnads.cfg)
- modify server IP address in server1.cfg, pointing to MaxScale server - modify server IP address in server1.cfg, pointing to MaxScale server
- maxadmin executable must be in the nagios server - maxadmin executable must be in the nagios server
- default MaxScale AdminInterface port is 6603 - default MaxScale AdminInterface port is 6603
- default maxadmin executable path is /usr/local/skysql/maxscale/bin/maxadmin - default maxadmin executable path is /usr/local/mariadb/maxscale/bin/maxadmin
It can be changed by -m option It can be changed by -m option
- maxadmin executable could be copied from an existing maxscale installation (default location is /usr/local/skysql/maxscale/bin/maxadmin) - maxadmin executable could be copied from an existing maxscale installation (default location is /usr/local/mariadb/maxscale/bin/maxadmin)
This example shows configuration that needs to be done on Nagios server in order to communicate to MaxScale server that is running on host server1. This example shows configuration that needs to be done on Nagios server in order to communicate to MaxScale server that is running on host server1.
In this example we are using the check_maxscale_resource as the check command In this example we are using the check_maxscale_resource as the check command
@ -85,7 +85,7 @@ In this example we are using the check_maxscale_resource as the check command
use local-service use local-service
host_name server1 host_name server1
service_description MaxScale_sessions service_description MaxScale_sessions
check_command check_maxscale_resource!6603!admin!skysql!sessions!/path_to/maxadmin check_command check_maxscale_resource!6603!admin!mariadb!sessions!/path_to/maxadmin
notifications_enabled 0 notifications_enabled 0
} }

View File

@ -92,7 +92,7 @@ After this we have a fully working configuration and we can move on to starting
Upon completion of the configuration process MaxScale is ready to be started . This may either be done manually by running the maxscale command or via the service interface. The service scripts are located in the `/etc/init.d/` folder and are accessible through both the `service` and `systemctl` commands. Upon completion of the configuration process MaxScale is ready to be started . This may either be done manually by running the maxscale command or via the service interface. The service scripts are located in the `/etc/init.d/` folder and are accessible through both the `service` and `systemctl` commands.
After starting MaxScale check the error log in /usr/local/skysql/maxscale/log to see if any errors are detected in the configuration file. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured. After starting MaxScale check the error log in /usr/local/mariadb/maxscale/log to see if any errors are detected in the configuration file. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured.
MaxScale is now ready to start accepting client connections and routing them. Queries are routed to the right servers based on the database they target and switching between the shards is semaless since MaxScale keeps the session state intact between servers. MaxScale is now ready to start accepting client connections and routing them. Queries are routed to the right servers based on the database they target and switching between the shards is semaless since MaxScale keeps the session state intact between servers.

View File

@ -9,14 +9,14 @@ echo Running $clients parallel iterations of $cmdcnt commands
for ((cnt=0; cnt<$clients; cnt++ )); do for ((cnt=0; cnt<$clients; cnt++ )); do
for ((i=0; i<$cmdcnt; i++ )); do for ((i=0; i<$cmdcnt; i++ )); do
maxadmin -pskysql show services; maxadmin -pmariadb show services;
done >/dev/null & done >/dev/null &
done >& /dev/null done >& /dev/null
peak=0 peak=0
while [ "`jobs -p`" != "" ]; do while [ "`jobs -p`" != "" ]; do
jobs >& /dev/null jobs >& /dev/null
zombies=`maxadmin -pskysql list dcbs | grep -ci zombies` zombies=`maxadmin -pmariadb list dcbs | grep -ci zombies`
if [ $zombies -gt $peak ] ; then if [ $zombies -gt $peak ] ; then
peak=$zombies peak=$zombies
fi fi
@ -29,7 +29,7 @@ else
passed=`expr $passed + 1` passed=`expr $passed + 1`
echo "Zombie collection ($peak): Passed" echo "Zombie collection ($peak): Passed"
fi fi
zombies=`maxadmin -pskysql list dcbs | grep -ci zombies` zombies=`maxadmin -pmariadb list dcbs | grep -ci zombies`
if [ $zombies != "0" ]; then if [ $zombies != "0" ]; then
echo "Residual zombie DCBs: Failed" echo "Residual zombie DCBs: Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -37,7 +37,7 @@ else
passed=`expr $passed + 1` passed=`expr $passed + 1`
echo "Residual zombie DCBs: Passed" echo "Residual zombie DCBs: Passed"
fi fi
sessions=`maxadmin -pskysql list services | awk -F\| '/ cli/ { print $3 }'` sessions=`maxadmin -pmariadb list services | awk -F\| '/ cli/ { print $3 }'`
if [ $sessions -gt 3 ]; then if [ $sessions -gt 3 ]; then
echo "Session shutdown, $sessions: Failed" echo "Session shutdown, $sessions: Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -46,7 +46,7 @@ else
echo "Session shutdown: Passed" echo "Session shutdown: Passed"
fi fi
sessions=`maxadmin -pskysql list services | awk -F\| '/ cli/ { print $4 }'` sessions=`maxadmin -pmariadb list services | awk -F\| '/ cli/ { print $4 }'`
echo "Test run complete. $passed passes, $failure failures" echo "Test run complete. $passed passes, $failure failures"
echo "$sessions CLI sessions executed" echo "$sessions CLI sessions executed"

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
failure=0 failure=0
passed=0 passed=0
maxadmin -pskysql help >& /dev/null maxadmin -pmariadb help >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "Auth test (correct password): Failed" echo "Auth test (correct password): Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -17,7 +17,7 @@ else
passed=`expr $passed + 1` passed=`expr $passed + 1`
echo "Auth test (wrong password): Passed" echo "Auth test (wrong password): Passed"
fi fi
maxadmin --password=skysql help >& /dev/null maxadmin --password=mariadb help >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "Auth test (long option): Failed" echo "Auth test (long option): Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -33,7 +33,7 @@ for op in enable disable
do do
for cmd in heartbeat root for cmd in heartbeat root
do do
maxadmin -pskysql $op $cmd >& /dev/null maxadmin -pmariadb $op $cmd >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "$op $cmd (missing arg): Failed" echo "$op $cmd (missing arg): Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -42,7 +42,7 @@ do
echo "$op $cmd (missing arg): Passed" echo "$op $cmd (missing arg): Passed"
fi fi
maxadmin -pskysql $op $cmd qwerty >& /dev/null maxadmin -pmariadb $op $cmd qwerty >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "$op $cmd (invalid arg): Failed" echo "$op $cmd (invalid arg): Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -51,7 +51,7 @@ do
echo "$op $cmd (invalied arg): Passed" echo "$op $cmd (invalied arg): Passed"
fi fi
maxadmin -pskysql $op $cmd xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >& /dev/null maxadmin -pmariadb $op $cmd xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "$op $cmd (long invalid arg): Failed" echo "$op $cmd (long invalid arg): Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -65,7 +65,7 @@ done
# #
# Test reload dbusers with short, and long garbage and without argument # Test reload dbusers with short, and long garbage and without argument
# #
maxadmin -pskysql reload dbusers qwerty >& /dev/null maxadmin -pmariadb reload dbusers qwerty >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "Reload dbusers (invalid arg): Failed" echo "Reload dbusers (invalid arg): Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -74,7 +74,7 @@ else
echo "Reload dbusers (invalid arg): Passed" echo "Reload dbusers (invalid arg): Passed"
fi fi
maxadmin -pskysql reload dbusers xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >& /dev/null maxadmin -pmariadb reload dbusers xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "Reload dbusers (long invalid arg): Failed" echo "Reload dbusers (long invalid arg): Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -84,7 +84,7 @@ else
fi fi
maxadmin -pskysql reload dbusers >& /dev/null maxadmin -pmariadb reload dbusers >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "Reload dbusers (missing arg): Failed" echo "Reload dbusers (missing arg): Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -96,7 +96,7 @@ fi
# #
# Test enable|disable log debug|trace|message|error # Test enable|disable log debug|trace|message|error
# #
maxadmin -pskysql enable log debug >& /dev/null maxadmin -pmariadb enable log debug >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "Enable debug log: Failed" echo "Enable debug log: Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -105,7 +105,7 @@ else
echo "Enable debug log: Passed" echo "Enable debug log: Passed"
fi fi
maxadmin -pskysql enable log trace >& /dev/null maxadmin -pmariadb enable log trace >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "Enable trace log: Failed" echo "Enable trace log: Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -114,7 +114,7 @@ else
echo "Enable trace log: Passed" echo "Enable trace log: Passed"
fi fi
maxadmin -pskysql enable log message >& /dev/null maxadmin -pmariadb enable log message >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "Enable message log: Failed" echo "Enable message log: Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -123,7 +123,7 @@ else
echo "Enable message log: Passed" echo "Enable message log: Passed"
fi fi
maxadmin -pskysql enable log error >& /dev/null maxadmin -pmariadb enable log error >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "Enable error log: Failed" echo "Enable error log: Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -134,7 +134,7 @@ fi
maxadmin -pskysql disable log debug >& /dev/null maxadmin -pmariadb disable log debug >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "Disable debug log: Failed" echo "Disable debug log: Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -143,7 +143,7 @@ else
echo "Disable debug log: Passed" echo "Disable debug log: Passed"
fi fi
maxadmin -pskysql disable log trace >& /dev/null maxadmin -pmariadb disable log trace >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "Disable trace log: Failed" echo "Disable trace log: Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -157,7 +157,7 @@ fi
# #
for cmd in monitor service for cmd in monitor service
do do
maxadmin -pskysql restart $cmd >& /dev/null maxadmin -pmariadb restart $cmd >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "Restart $cmd (missing arg): Failed" echo "Restart $cmd (missing arg): Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -166,7 +166,7 @@ do
echo "Restart $cmd (missing arg): Passed" echo "Restart $cmd (missing arg): Passed"
fi fi
maxadmin -pskysql restart $cmd xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >& /dev/null maxadmin -pmariadb restart $cmd xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "Restart $cmd (long invalid arg): Failed" echo "Restart $cmd (long invalid arg): Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -175,7 +175,7 @@ do
echo "Restart $cmd (long invalid arg): Passed" echo "Restart $cmd (long invalid arg): Passed"
fi fi
maxadmin -pskysql restart $cmd qwerty >& /dev/null maxadmin -pmariadb restart $cmd qwerty >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "Restart $cmd (invalid arg): Failed" echo "Restart $cmd (invalid arg): Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -188,7 +188,7 @@ done
# #
# Test set server qwerty master withaout, with invalid and with long invalid arg # Test set server qwerty master withaout, with invalid and with long invalid arg
# #
maxadmin -pskysql set server qwerty >& /dev/null maxadmin -pmariadb set server qwerty >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "Set server qwerty (missing arg): Failed" echo "Set server qwerty (missing arg): Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -197,7 +197,7 @@ else
echo "Set server (missing arg): Passed" echo "Set server (missing arg): Passed"
fi fi
maxadmin -pskysql set server qwerty mamaster >& /dev/null maxadmin -pmariadb set server qwerty mamaster >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "Set server qwerty (invalid arg): Failed" echo "Set server qwerty (invalid arg): Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -206,7 +206,7 @@ else
echo "Set server qwerty (invalid arg): Passed" echo "Set server qwerty (invalid arg): Passed"
fi fi
maxadmin -pskysql set server qwerty xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >& /dev/null maxadmin -pmariadb set server qwerty xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "Set server qwerty (long invalid arg): Failed" echo "Set server qwerty (long invalid arg): Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -218,7 +218,7 @@ fi
for cmd in clients dcbs filters listeners modules monitors services servers sessions threads for cmd in clients dcbs filters listeners modules monitors services servers sessions threads
do do
maxadmin -pskysql list $cmd | grep -s '-' >& /dev/null maxadmin -pmariadb list $cmd | grep -s '-' >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "list command ($cmd): Failed" echo "list command ($cmd): Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -230,7 +230,7 @@ done
for cmd in dcbs dbusers epoll filters modules monitors services servers sessions threads users for cmd in dcbs dbusers epoll filters modules monitors services servers sessions threads users
do do
maxadmin -pskysql show $cmd | grep -s ' ' >& /dev/null maxadmin -pmariadb show $cmd | grep -s ' ' >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "show command ($cmd): Failed" echo "show command ($cmd): Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -240,7 +240,7 @@ do
fi fi
done done
master=`maxadmin -pskysql list servers | awk '/Master/ { print $1; }'` master=`maxadmin -pmariadb list servers | awk '/Master/ { print $1; }'`
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "Extract master server: Failed" echo "Extract master server: Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -255,7 +255,7 @@ else
passed=`expr $passed + 1` passed=`expr $passed + 1`
echo "Get master server: Passed" echo "Get master server: Passed"
fi fi
maxadmin -pskysql show server $master | grep -s 'Master' >& /dev/null maxadmin -pmariadb show server $master | grep -s 'Master' >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "show server master: Failed" echo "show server master: Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -264,7 +264,7 @@ else
echo "show server master: Passed" echo "show server master: Passed"
fi fi
maxadmin -pskysql set server $master maint >& /dev/null maxadmin -pmariadb set server $master maint >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "set server $master maint: Failed" echo "set server $master maint: Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -273,7 +273,7 @@ else
echo "set server $master maint: Passed" echo "set server $master maint: Passed"
fi fi
maxadmin -pskysql list servers | grep $master | grep -s 'Maint' >& /dev/null maxadmin -pmariadb list servers | grep $master | grep -s 'Maint' >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "set maintenance mode: Failed" echo "set maintenance mode: Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -282,7 +282,7 @@ else
echo "set maintenance mode: Passed" echo "set maintenance mode: Passed"
fi fi
maxadmin -pskysql clear server $master maint >& /dev/null maxadmin -pmariadb clear server $master maint >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "clear server: Failed" echo "clear server: Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -290,7 +290,7 @@ else
passed=`expr $passed + 1` passed=`expr $passed + 1`
echo "clear server: Passed" echo "clear server: Passed"
fi fi
maxadmin -pskysql list servers | grep $master | grep -s 'Maint' >& /dev/null maxadmin -pmariadb list servers | grep $master | grep -s 'Maint' >& /dev/null
if [ $? -eq "0" ]; then if [ $? -eq "0" ]; then
echo "clear maintenance mode: Failed" echo "clear maintenance mode: Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -299,7 +299,7 @@ else
echo "clear maintenance mode: Passed" echo "clear maintenance mode: Passed"
fi fi
dcbs=`maxadmin -pskysql list dcbs | awk -F\| '/listening/ { if ( NF > 1 ) print $1 }'` dcbs=`maxadmin -pmariadb list dcbs | awk -F\| '/listening/ { if ( NF > 1 ) print $1 }'`
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "Get dcb listeners: Failed" echo "Get dcb listeners: Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -310,7 +310,7 @@ fi
for i in $dcbs for i in $dcbs
do do
maxadmin -pskysql show dcb $i | grep -s 'listening' >& /dev/null maxadmin -pmariadb show dcb $i | grep -s 'listening' >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "show dcb listeners: Failed" echo "show dcb listeners: Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -325,7 +325,7 @@ done
# #
for cmd in dcb eventq filter monitor server service sessions for cmd in dcb eventq filter monitor server service sessions
do do
maxadmin -pskysql show $cmd qwerty | grep -s '-' >& /dev/null maxadmin -pmariadb show $cmd qwerty | grep -s '-' >& /dev/null
if [ $? -eq "0" ]; then if [ $? -eq "0" ]; then
echo "show $cmd (invalid arg): Failed" echo "show $cmd (invalid arg): Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -340,7 +340,7 @@ done
# #
for cmd in monitor service for cmd in monitor service
do do
maxadmin -pskysql shutdown $cmd qwerty | grep -s '-' >& /dev/null maxadmin -pmariadb shutdown $cmd qwerty | grep -s '-' >& /dev/null
if [ $? -eq "0" ]; then if [ $? -eq "0" ]; then
echo "Shutdown $cmd (invalid extra arg):Failed" echo "Shutdown $cmd (invalid extra arg):Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -351,7 +351,7 @@ do
done done
sessions=`maxadmin -pskysql list sessions | awk -F\| '/Listener/ { if ( NF > 1 ) print $1 }'` sessions=`maxadmin -pmariadb list sessions | awk -F\| '/Listener/ { if ( NF > 1 ) print $1 }'`
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "Get listener sessions: Failed" echo "Get listener sessions: Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -362,7 +362,7 @@ fi
for i in $sessions for i in $sessions
do do
maxadmin -pskysql show session $i | grep -s 'Listener' >& /dev/null maxadmin -pmariadb show session $i | grep -s 'Listener' >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "show session listeners: Failed" echo "show session listeners: Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -372,7 +372,7 @@ do
fi fi
done done
filters=`maxadmin -pskysql list filters | awk -F\| '{ if ( NF > 1 ) print $1 }'| grep -v Options` filters=`maxadmin -pmariadb list filters | awk -F\| '{ if ( NF > 1 ) print $1 }'| grep -v Options`
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "Get Filter list: Failed" echo "Get Filter list: Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -383,7 +383,7 @@ fi
for i in $filters for i in $filters
do do
maxadmin -pskysql show filter $i | grep -s 'Filter' >& /dev/null maxadmin -pmariadb show filter $i | grep -s 'Filter' >& /dev/null
if [ $? -eq "1" ]; then if [ $? -eq "1" ]; then
echo "show filter: Failed" echo "show filter: Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -393,7 +393,7 @@ do
fi fi
done done
maxadmin -pskysql list services | \ maxadmin -pmariadb list services | \
awk -F\| '{ if (NF > 1) { sub(/ +$/, "", $1); printf("show service \"%s\"\n", $1); } }' > script1.$$ awk -F\| '{ if (NF > 1) { sub(/ +$/, "", $1); printf("show service \"%s\"\n", $1); } }' > script1.$$
grep -cs "show service" script1.$$ >/dev/null grep -cs "show service" script1.$$ >/dev/null
if [ $? -ne "0" ]; then if [ $? -ne "0" ]; then
@ -403,7 +403,7 @@ else
passed=`expr $passed + 1` passed=`expr $passed + 1`
echo "list services: Passed" echo "list services: Passed"
fi fi
maxadmin -pskysql script1.$$ | grep -cs 'Service' > /dev/null maxadmin -pmariadb script1.$$ | grep -cs 'Service' > /dev/null
if [ $? -ne "0" ]; then if [ $? -ne "0" ]; then
echo "Show Service: Failed" echo "Show Service: Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -414,7 +414,7 @@ fi
rm -f script1.$$ rm -f script1.$$
maxadmin -pskysql list monitors | \ maxadmin -pmariadb list monitors | \
awk -F\| '{ if (NF > 1) { sub(/ +$/, "", $1); printf("show monitor \"%s\"\n", $1); } }' > script1.$$ awk -F\| '{ if (NF > 1) { sub(/ +$/, "", $1); printf("show monitor \"%s\"\n", $1); } }' > script1.$$
grep -cs "show monitor" script1.$$ >/dev/null grep -cs "show monitor" script1.$$ >/dev/null
if [ $? -ne "0" ]; then if [ $? -ne "0" ]; then
@ -424,7 +424,7 @@ else
passed=`expr $passed + 1` passed=`expr $passed + 1`
echo "list monitors: Passed" echo "list monitors: Passed"
fi fi
maxadmin -pskysql script1.$$ | grep -cs 'Monitor' > /dev/null maxadmin -pmariadb script1.$$ | grep -cs 'Monitor' > /dev/null
if [ $? -ne "0" ]; then if [ $? -ne "0" ]; then
echo "Show Monitor: Failed" echo "Show Monitor: Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -435,7 +435,7 @@ fi
rm -f script1.$$ rm -f script1.$$
maxadmin -pskysql list sessions | \ maxadmin -pmariadb list sessions | \
awk -F\| ' /^0x/ { if (NF > 1) { sub(/ +$/, "", $1); printf("show session \"%s\"\n", $1); } }' > script1.$$ awk -F\| ' /^0x/ { if (NF > 1) { sub(/ +$/, "", $1); printf("show session \"%s\"\n", $1); } }' > script1.$$
grep -cs "show session" script1.$$ >/dev/null grep -cs "show session" script1.$$ >/dev/null
if [ $? -ne "0" ]; then if [ $? -ne "0" ]; then
@ -445,7 +445,7 @@ else
passed=`expr $passed + 1` passed=`expr $passed + 1`
echo "list sessions: Passed" echo "list sessions: Passed"
fi fi
maxadmin -pskysql script1.$$ | grep -cs 'Session' > /dev/null maxadmin -pmariadb script1.$$ | grep -cs 'Session' > /dev/null
if [ $? -ne "0" ]; then if [ $? -ne "0" ]; then
echo "Show Session: Failed" echo "Show Session: Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -456,7 +456,7 @@ fi
rm -f script1.$$ rm -f script1.$$
maxadmin -pskysql list dcbs | \ maxadmin -pmariadb list dcbs | \
awk -F\| ' /^ 0x/ { if (NF > 1) { sub(/ +$/, "", $1); sub(/ 0x/, "0x", $1); printf("show dcb \"%s\"\n", $1); } }' > script1.$$ awk -F\| ' /^ 0x/ { if (NF > 1) { sub(/ +$/, "", $1); sub(/ 0x/, "0x", $1); printf("show dcb \"%s\"\n", $1); } }' > script1.$$
grep -cs "show dcb" script1.$$ >/dev/null grep -cs "show dcb" script1.$$ >/dev/null
if [ $? -ne "0" ]; then if [ $? -ne "0" ]; then
@ -466,7 +466,7 @@ else
passed=`expr $passed + 1` passed=`expr $passed + 1`
echo "list dcbs: Passed" echo "list dcbs: Passed"
fi fi
maxadmin -pskysql script1.$$ | grep -cs 'DCB' > /dev/null maxadmin -pmariadb script1.$$ | grep -cs 'DCB' > /dev/null
if [ $? -ne "0" ]; then if [ $? -ne "0" ]; then
echo "Show DCB: Failed" echo "Show DCB: Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`
@ -477,7 +477,7 @@ fi
rm -f script1.$$ rm -f script1.$$
maxadmin -pskysql list services | \ maxadmin -pmariadb list services | \
awk -F\| '{ if (NF > 1) { sub(/ +$/, "", $1); printf("show dbusers \"%s\"\n", $1); } }' > script1.$$ awk -F\| '{ if (NF > 1) { sub(/ +$/, "", $1); printf("show dbusers \"%s\"\n", $1); } }' > script1.$$
grep -cs "show dbusers" script1.$$ >/dev/null grep -cs "show dbusers" script1.$$ >/dev/null
if [ $? -ne "0" ]; then if [ $? -ne "0" ]; then
@ -487,7 +487,7 @@ else
passed=`expr $passed + 1` passed=`expr $passed + 1`
echo "list services: Passed" echo "list services: Passed"
fi fi
maxadmin -pskysql script1.$$ | grep -cs 'Users table data' > /dev/null maxadmin -pmariadb script1.$$ | grep -cs 'Users table data' > /dev/null
if [ $? -ne "0" ]; then if [ $? -ne "0" ]; then
echo "Show dbusers: Failed" echo "Show dbusers: Failed"
failure=`expr $failure + 1` failure=`expr $failure + 1`

View File

@ -70,7 +70,7 @@ EOF
'u' => 'root', # username 'u' => 'root', # username
'p' => '', # password 'p' => '', # password
'P' => 6603, # port 'P' => 6603, # port
'm' => '/usr/local/skysql/maxscale/bin/maxadmin', # maxadmin 'm' => '/usr/local/mariadb/maxscale/bin/maxadmin', # maxadmin
); );
my $MAXADMIN_DEFAULT = $opts{'m'}; my $MAXADMIN_DEFAULT = $opts{'m'};

View File

@ -70,7 +70,7 @@ EOF
'u' => 'root', # username 'u' => 'root', # username
'p' => '', # password 'p' => '', # password
'P' => 6603, # port 'P' => 6603, # port
'm' => '/usr/local/skysql/maxscale/bin/maxadmin', # maxadmin 'm' => '/usr/local/mariadb/maxscale/bin/maxadmin', # maxadmin
); );
my $MAXADMIN_DEFAULT = $opts{'m'}; my $MAXADMIN_DEFAULT = $opts{'m'};

View File

@ -70,7 +70,7 @@ EOF
'u' => 'root', # username 'u' => 'root', # username
'p' => '', # password 'p' => '', # password
'P' => 6603, # port 'P' => 6603, # port
'm' => '/usr/local/skysql/maxscale/bin/maxadmin', # maxadmin 'm' => '/usr/local/mariadb/maxscale/bin/maxadmin', # maxadmin
); );
my $MAXADMIN_DEFAULT = $opts{'m'}; my $MAXADMIN_DEFAULT = $opts{'m'};

View File

@ -43,7 +43,7 @@ define service{
use local-service ; Name of service template to use use local-service ; Name of service template to use
host_name server1 host_name server1
service_description MaxScale_modules service_description MaxScale_modules
check_command check_maxscale_resource!6603!admin!skysql!modules check_command check_maxscale_resource!6603!admin!mariadb!modules
notifications_enabled 0 notifications_enabled 0
} }
@ -52,7 +52,7 @@ define service{
use local-service ; Name of service template to use use local-service ; Name of service template to use
host_name server1 host_name server1
service_description MaxScale_services service_description MaxScale_services
check_command check_maxscale_resource!6603!admin!skysql!services check_command check_maxscale_resource!6603!admin!mariadb!services
notifications_enabled 0 notifications_enabled 0
} }
@ -61,7 +61,7 @@ define service{
use local-service ; Name of service template to use use local-service ; Name of service template to use
host_name server1 host_name server1
service_description MaxScale_listeners service_description MaxScale_listeners
check_command check_maxscale_resource!6603!admin!skysql!listeners check_command check_maxscale_resource!6603!admin!mariadb!listeners
notifications_enabled 0 notifications_enabled 0
} }
@ -70,7 +70,7 @@ define service{
use local-service ; Name of service template to use use local-service ; Name of service template to use
host_name server1 host_name server1
service_description MaxScale_servers service_description MaxScale_servers
check_command check_maxscale_resource!6603!admin!skysql!servers check_command check_maxscale_resource!6603!admin!mariadb!servers
notifications_enabled 0 notifications_enabled 0
} }
@ -79,7 +79,7 @@ define service{
use local-service ; Name of service template to use use local-service ; Name of service template to use
host_name server1 host_name server1
service_description MaxScale_sessions service_description MaxScale_sessions
check_command check_maxscale_resource!6603!admin!skysql!sessions check_command check_maxscale_resource!6603!admin!mariadb!sessions
notifications_enabled 0 notifications_enabled 0
} }
@ -88,7 +88,7 @@ define service{
use local-service ; Name of service template to use use local-service ; Name of service template to use
host_name server1 host_name server1
service_description MaxScale_filters service_description MaxScale_filters
check_command check_maxscale_resource!6603!admin!skysql!filters check_command check_maxscale_resource!6603!admin!mariadb!filters
notifications_enabled 0 notifications_enabled 0
} }
@ -97,7 +97,7 @@ define service{
use local-service ; Name of service template to use use local-service ; Name of service template to use
host_name server1 host_name server1
service_description MaxScale_monitors service_description MaxScale_monitors
check_command check_maxscale_monitors!6603!admin!skysql!monitors check_command check_maxscale_monitors!6603!admin!mariadb!monitors
notifications_enabled 0 notifications_enabled 0
} }
@ -106,6 +106,6 @@ define service{
use local-service ; Name of service template to use use local-service ; Name of service template to use
host_name server1 host_name server1
service_description MaxScale_threads service_description MaxScale_threads
check_command check_maxscale_threads!6603!admin!skysql!threads!/usr/local/skysql/maxscale/bin/maxadmin check_command check_maxscale_threads!6603!admin!mariadb!threads!/usr/local/mariadb/maxscale/bin/maxadmin
notifications_enabled 0 notifications_enabled 0
} }

View File

@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.6)
include(../macros.cmake) include(../macros.cmake)
enable_testing() enable_testing()
set_variables() set_variables()
set(CMAKE_INSTALL_PREFIX "/usr/local/skysql/rabbitmq-consumer" CACHE PATH "Prefix prepended to install directories.") set(CMAKE_INSTALL_PREFIX "/usr/local/mariadb/rabbitmq-consumer" CACHE PATH "Prefix prepended to install directories.")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../cmake") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../cmake")
project("RabbitMQ Consumer") project("RabbitMQ Consumer")

View File

@ -2,7 +2,7 @@
%define name rabbitmq-message-consumer %define name rabbitmq-message-consumer
%define release beta %define release beta
%define version 1.0 %define version 1.0
%define install_path /usr/local/skysql/maxscale/extra/consumer/ %define install_path /usr/local/mariadb/maxscale/extra/consumer/
BuildRoot: %{buildroot} BuildRoot: %{buildroot}
Summary: rabbitmq-message-consumer Summary: rabbitmq-message-consumer

View File

@ -91,7 +91,7 @@ char *pw;
initialise(); initialise();
if (users == NULL) if (users == NULL)
{ {
if (strcmp(username, "admin") == 0 && strcmp(password, "skysql") == 0) if (strcmp(username, "admin") == 0 && strcmp(password, "mariadb") == 0)
return 1; return 1;
} }
else else
@ -123,7 +123,7 @@ char uname[80], passwd[80];
sprintf(fname, "%s/etc/passwd", home); sprintf(fname, "%s/etc/passwd", home);
} }
else{ else{
sprintf(fname, "/usr/local/skysql/MaxScale/etc/passwd"); sprintf(fname, "/usr/local/mariadb/maxscale/etc/passwd");
} }
if ((fp = fopen(fname, "r")) == NULL) if ((fp = fopen(fname, "r")) == NULL)
return NULL; return NULL;
@ -159,7 +159,7 @@ char fname[1024], *home, *cpasswd;
sprintf(fname, "%s/etc/passwd", home); sprintf(fname, "%s/etc/passwd", home);
} }
else{ else{
sprintf(fname, "/usr/local/skysql/MaxScale/etc/passwd"); sprintf(fname, "/usr/local/mariadb/maxscale/etc/passwd");
} }
if (users == NULL) if (users == NULL)
@ -259,8 +259,8 @@ char* admin_remove_user(
sprintf(fname, "%s/etc/passwd", home); sprintf(fname, "%s/etc/passwd", home);
sprintf(fname_tmp, "%s/etc/passwd_tmp", home); sprintf(fname_tmp, "%s/etc/passwd_tmp", home);
} else { } else {
sprintf(fname, "/usr/local/skysql/MaxScale/etc/passwd"); sprintf(fname, "/usr/local/mariadb/maxscale/etc/passwd");
sprintf(fname_tmp, "/usr/local/skysql/MaxScale/etc/passwd_tmp"); sprintf(fname_tmp, "/usr/local/mariadb/maxscale/etc/passwd_tmp");
} }
/** /**
* Rewrite passwd file from memory. * Rewrite passwd file from memory.

View File

@ -997,10 +997,10 @@ static void usage(void)
" (default: $MAXSCALE_HOME/etc/MaxScale.cnf)\n" " (default: $MAXSCALE_HOME/etc/MaxScale.cnf)\n"
" -l|--log=... log to file or shared memory\n" " -l|--log=... log to file or shared memory\n"
" -lfile or -lshm - defaults to shared memory\n" " -lfile or -lshm - defaults to shared memory\n"
" -s|--syslog= log messages to syslog" " -s|--syslog= log messages to syslog."
" true or false - defaults to true" " True or false - defaults to true\n"
" -S|--maxscalelog= log messages to MaxScale log" " -S|--maxscalelog= log messages to MaxScale log."
" true or false - defaults to true" " True or false - defaults to true\n"
" -v|--version print version info and exit\n" " -v|--version print version info and exit\n"
" -?|--help show this help\n" " -?|--help show this help\n"
, progname); , progname);

View File

@ -109,7 +109,7 @@ char* get_maxscale_home(void)
char* home = getenv("MAXSCALE_HOME"); char* home = getenv("MAXSCALE_HOME");
if (home == NULL) if (home == NULL)
{ {
home = "/usr/local/skysql/MaxScale"; home = "/usr/local/mariadb/maxscale";
} }
return home; return home;
} }
@ -118,7 +118,7 @@ char* get_maxscale_home(void)
/** /**
* Load the dynamic library related to a gateway module. The routine * Load the dynamic library related to a gateway module. The routine
* will look for library files in the current directory, * will look for library files in the current directory,
* $MAXSCALE_HOME/modules and /usr/local/skysql/MaxScale/modules. * $MAXSCALE_HOME/modules and /usr/local/mariadb/maxscale/modules.
* *
* @param module Name of the module to load * @param module Name of the module to load
* @param type Type of module, used purely for registration * @param type Type of module, used purely for registration

View File

@ -73,7 +73,7 @@ static int reported = 0;
home = getenv("MAXSCALE_HOME"); home = getenv("MAXSCALE_HOME");
if (home == NULL) { if (home == NULL) {
home = "/usr/local/skysql/MaxScale"; home = "/usr/local/mariadb/maxscale";
} }
snprintf(secret_file, 255, "%s/etc/.secrets", home); snprintf(secret_file, 255, "%s/etc/.secrets", home);

View File

@ -229,7 +229,7 @@ GWPROTOCOL *funcs;
{ {
/* Try loading authentication data from file cache */ /* Try loading authentication data from file cache */
char *ptr, path[4097]; char *ptr, path[4097];
strcpy(path, "/usr/local/skysql/MaxScale"); strcpy(path, "/usr/local/mariadb/maxscale");
if ((ptr = getenv("MAXSCALE_HOME")) != NULL) if ((ptr = getenv("MAXSCALE_HOME")) != NULL)
{ {
strncpy(path, ptr, 4096); strncpy(path, ptr, 4096);
@ -259,7 +259,7 @@ GWPROTOCOL *funcs;
/* Save authentication data to file cache */ /* Save authentication data to file cache */
char *ptr, path[4097]; char *ptr, path[4097];
int mkdir_rval = 0; int mkdir_rval = 0;
strcpy(path, "/usr/local/skysql/MaxScale"); strcpy(path, "/usr/local/mariadb/maxscale");
if ((ptr = getenv("MAXSCALE_HOME")) != NULL) if ((ptr = getenv("MAXSCALE_HOME")) != NULL)
{ {
strncpy(path, ptr, 4096); strncpy(path, ptr, 4096);

View File

@ -37,7 +37,7 @@
/** /**
* test1 default user * test1 default user
* *
* Test that the username password admin/skysql is accepted if no users * Test that the username password admin/mariadb is accepted if no users
* have been created and that no other users are accepted * have been created and that no other users are accepted
* *
* WARNING: $MAXSCALE_HOME/etc/passwd must be removed before this test is run * WARNING: $MAXSCALE_HOME/etc/passwd must be removed before this test is run
@ -45,7 +45,7 @@
static int static int
test1() test1()
{ {
if (admin_verify("admin", "skysql") == 0) if (admin_verify("admin", "mariadb") == 0)
{ {
fprintf(stderr, "admin_verify: test 1.1 (default user) failed.\n"); fprintf(stderr, "admin_verify: test 1.1 (default user) failed.\n");
return 1; return 1;
@ -270,7 +270,7 @@ char *home, buf[1024];
/* Unlink any existing password file before running this test */ /* Unlink any existing password file before running this test */
if ((home = getenv("MAXSCALE_HOME")) == NULL || strlen(home) >= 1024) if ((home = getenv("MAXSCALE_HOME")) == NULL || strlen(home) >= 1024)
home = "/usr/local/skysql"; home = "/usr/local/mariadb";
sprintf(buf, "%s/etc/passwd", home); sprintf(buf, "%s/etc/passwd", home);
if(!is_valid_posix_path(buf)) if(!is_valid_posix_path(buf))
exit(1); exit(1);
@ -284,7 +284,7 @@ char *home, buf[1024];
result += test5(); result += test5();
/* Add the default user back so other tests can use it */ /* Add the default user back so other tests can use it */
admin_add_user("admin", "skysql"); admin_add_user("admin", "mariadb");
exit(result); exit(result);
} }

View File

@ -29,7 +29,7 @@ function execute_test()
function reload_conf() function reload_conf()
{ {
$BINDIR/bin/maxadmin --user=admin --password=skysql reload config $BINDIR/bin/maxadmin --user=admin --password=mariadb reload config
if [[ $? -ne 0 ]] if [[ $? -ne 0 ]]
then then
echo "Test failed: maxadmin returned a non-zero value." echo "Test failed: maxadmin returned a non-zero value."
@ -55,7 +55,7 @@ MAXPID=$BINDIR/log/$(ls -1 $BINDIR/log|grep maxscale)
TEST1=$SRCDIR/server/modules/filter/test/tee_recursion1.cnf TEST1=$SRCDIR/server/modules/filter/test/tee_recursion1.cnf
TEST2=$SRCDIR/server/modules/filter/test/tee_recursion2.cnf TEST2=$SRCDIR/server/modules/filter/test/tee_recursion2.cnf
$BINDIR/bin/maxadmin --user=admin --password=skysql flush logs $BINDIR/bin/maxadmin --user=admin --password=mariadb flush logs
mv $CONF $OLDCONF mv $CONF $OLDCONF
cp $TEST1 $CONF cp $TEST1 $CONF

View File

@ -24,7 +24,7 @@
* @verbatim * @verbatim
* Revision History * Revision History
* *
* See GitHub https://github.com/skysql/MaxScale * See GitHub https://github.com/mariadb-corporation/MaxScale
* *
* @endverbatim * @endverbatim
*/ */

View File

@ -24,7 +24,7 @@
* @verbatim * @verbatim
* Revision History * Revision History
* *
* See GitHub https://github.com/skysql/MaxScale * See GitHub https://github.com/mariadb-corporation/MaxScale
* *
* @endverbatim * @endverbatim
*/ */

View File

@ -24,7 +24,7 @@
* @verbatim * @verbatim
* Revision History * Revision History
* *
* See GitHub https://github.com/skysql/MaxScale * See GitHub https://github.com/mariadb-corporation/MaxScale
* *
* @endverbatim * @endverbatim
*/ */

View File

@ -79,7 +79,7 @@ struct dirent *dp;
if (router->binlogdir == NULL) if (router->binlogdir == NULL)
{ {
strcpy(path, "/usr/local/skysql/MaxScale"); strcpy(path, "/usr/local/mariadb/maxscale");
if ((ptr = getenv("MAXSCALE_HOME")) != NULL) if ((ptr = getenv("MAXSCALE_HOME")) != NULL)
{ {
strncpy(path, ptr,PATH_MAX); strncpy(path, ptr,PATH_MAX);
@ -633,7 +633,7 @@ blr_cache_response(ROUTER_INSTANCE *router, char *response, GWBUF *buf)
char path[4097], *ptr; char path[4097], *ptr;
int fd; int fd;
strcpy(path, "/usr/local/skysql/MaxScale"); strcpy(path, "/usr/local/mariadb/maxscale");
if ((ptr = getenv("MAXSCALE_HOME")) != NULL) if ((ptr = getenv("MAXSCALE_HOME")) != NULL)
{ {
strncpy(path, ptr, 4096); strncpy(path, ptr, 4096);
@ -672,7 +672,7 @@ char path[4097], *ptr;
int fd; int fd;
GWBUF *buf; GWBUF *buf;
strcpy(path, "/usr/local/skysql/MaxScale"); strcpy(path, "/usr/local/mariadb/maxscale");
if ((ptr = getenv("MAXSCALE_HOME")) != NULL) if ((ptr = getenv("MAXSCALE_HOME")) != NULL)
{ {
strncpy(path, ptr, 4096); strncpy(path, ptr, 4096);