diff --git a/Adding-a-MySQL-target.md b/Adding-a-MySQL-target.md index 9ed16d5..f017f5c 100644 --- a/Adding-a-MySQL-target.md +++ b/Adding-a-MySQL-target.md @@ -1,7 +1,5 @@ This page explains the process of adding a new MySQL target host to Warpgate and allowing users to connect to it. -> This feature is available in v0.4+ - # Authentication setup Currently, Wargate can connect to MySQL and MariaDB servers with a username/password via the `mysql_native_password` auth mode. @@ -10,7 +8,7 @@ As a MySQL protocol server, Warpgate only allows secure (TLS) connections and us # Enabling MySQL listener -Enable the MySQL protocol in your config file (default: `/etc/warpgate.yaml`): +Enable the MySQL protocol in your config file (default: `/etc/warpgate.yaml`) if you didn't do so during the initial setup: ```diff + mysql: @@ -23,48 +21,21 @@ You can reuse the same certificate and key that are used for the HTTP listener. # Connection setup -Add the target host to the targets list in the Warpgate config file (default: `/etc/warpgate.yaml`), for example: +[Log into the Warpgate admin UI](https://github.com/warp-tech/warpgate/wiki/Accessing-the-admin-UI) and navigate to `Config` > `Targets` > `Add target` and give the new MySQL target a name: -```diff -[...] - targets: -+ - name: db -+ allow_roles: -+ - "warpgate:admin" -+ mysql: -+ host: 192.168.1.10 -+ port: 3306 # optional -+ username: dev -+ password: '123' -+ tls: -+ mode: preferred # or "disabled" or "required" -+ verify: false +image - - name: web-admin - allow_roles: - - "warpgate:admin" - web_admin: {} - users: -[...] -``` +Fill out the configuration: -See [[Target TLS options]] for the description of TLS options. +image -Warpgate will automatically pick up any changes to the config file if it's valid, so give it a quick check: +The target should show up on the Warpgate's homepage: -``` -$ warpgate check -14:06:56 INFO Using config: "/etc/warpgate.yaml" (users: 1, targets: 2, roles: 1) -14:06:56 INFO No problems found -``` - -The target should show up on the Warpgate homepage as well as on the _Targets_ admin UI page: - -image +image Users will be able to click the entry to obtain connection instructions: -image +image # Client setup