> For the complete documentation index, see [llms.txt](https://newdocs.keeper.io/kcm-linux-rpm-method/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://newdocs.keeper.io/kcm-linux-rpm-method/authentication/using-keeper-connection-manager-with-a-mysql-database/installing-mariadb-for-guacamole-authentication.md).

# Installing MariaDB for Guacamole Authentication

CentOS and RHEL both provide a package for the MariaDB database server called "mariadb-server". Installing this package will install a version of MariaDB that is[ explicitly supported by Keeper Connection Manager](/kcm-linux-rpm-method/scope-of-support.md). If you do not have an existing database instance or third-party database hosting provider that you would prefer to use, installing a fresh instance of MariaDB for use by Guacamole will work nicely:

```
$ sudo yum install mariadb-server
```

As with other standard CentOS / RHEL packages providing a service, the MariaDB service will not be started by default after the "mariadb-server" package is installed. It must be started manually, and then configured to automatically start if the system is rebooted:

```
$ sudo systemctl start mariadb
$ sudo systemctl enable mariadb
```

### Dropping default anonymous users <a href="#id-.installingmariadbforguacamoleauthenticationv2.x-droppingdefaultanonymoususers" id="id-.installingmariadbforguacamoleauthenticationv2.x-droppingdefaultanonymoususers"></a>

**If MariaDB is installed locally (on the same server as Apache Guacamole), its default configuration will prevent Guacamole from authenticating**. This is due to the way that MariaDB handles authentication and anonymous database users: if an anonymous user is defined for the same hostname/address, MariaDB will use only the anonymous user, and authentication using a non-anonymous user and password from the same hostname/address will fail.

This can be checked by querying MariaDB's user table directly:

```
SELECT Host, User FROM mysql.user;
```

Any users with empty usernames in the results of the above query are anonymous users which may block authentication from succeeding:

```
+---------------------+----------------+
| Host                | User           |
+---------------------+----------------+
| %                   | guacamole_user |
| 127.0.0.1           | root           |
| ::1                 | root           |
| the.server.hostname |                |
| the.server.hostname | root           |
| localhost           |                |
| localhost           | root           |
+---------------------+----------------+
```

Dropping those users should allow non-anonymous authentication from those same hosts to succeed:

```
DROP USER ''@'localhost';
DROP USER ''@'the.server.hostname';
FLUSH PRIVILEGES;
```

### Pointing Guacamole at the new MariaDB instance <a href="#id-.installingmariadbforguacamoleauthenticationv2.x-pointingguacamoleatthenewmariadbinstance" id="id-.installingmariadbforguacamoleauthenticationv2.x-pointingguacamoleatthenewmariadbinstance"></a>

Once MariaDB has been deployed, you should move forward with [configuring Guacamole to use your new MariaDB instance](/kcm-linux-rpm-method/authentication/using-keeper-connection-manager-with-a-mysql-database.md). This process is documented in its entirety, and the default `/etc/guacamole/guacamole.properties` file also contains placeholders and comments to help guide administrators to the correct configuration properties. Overall, the process will involve:

* Installing the package providing MySQL / MariaDB support (`kcm-guacamole-auth-jdbc-mysql`).
* Creating a new database within your MariaDB instance using the provided schema files.
* Creating a database user that Guacamole can use to execute queries against your database.
* Editing `/etc/guacamole/guacamole.properties` to point Guacamole at your database (and to specify the credentials of the database user it should use).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://newdocs.keeper.io/kcm-linux-rpm-method/authentication/using-keeper-connection-manager-with-a-mysql-database/installing-mariadb-for-guacamole-authentication.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
