# Password generator(Postgres and MySQL)

Please watch video <https://www.youtube.com/watch?v=ZDD_DjkbVcQ>   or follow below instructions

You can use this feature to generate random passwords - Next time when you create a new postgres role try this feature to generate complex password

Please select option 6 followed by option 2 as illustrated below

<figure><img src="/files/uU3GNVTt17UXZiToNRYu" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/oixq6RcfItWN2hsT5sr6" alt=""><figcaption></figcaption></figure>

You need to select length , special chars etc.. or leave the defaults - Default is length of 20 , 2 digits , 2 special chars , 2 uppercase chars

<figure><img src="/files/BiLVsKEVOu1pPTQQ4YAA" alt="" width="375"><figcaption></figcaption></figure>

It produces plaintext password and encrypted password (scram-sha-256 format)

<figure><img src="/files/JaLa7uyDQKF7C1tO15lL" alt=""><figcaption></figcaption></figure>

<mark style="color:red;">**NOTE : When creating a new user in Postgres, please use encrypted passwords only. This will prevent password leakage in logs**</mark>

Example (Please see below screenshot)

<figure><img src="/files/M91vS4CtfcW98oVmWvk2" alt=""><figcaption></figcaption></figure>

You can also set custom profiles in config file to use the same pattern repeatedly&#x20;

Add below section to your config file located at /etc/klouddbshield/kshieldconfig.toml

```
[generatePassword]
length=9
numberCount=1
numUppercase=2
specialCharCount=5
```


---

# Agent Instructions: 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:

```
GET https://klouddb.gitbook.io/klouddb_shield/password-generator-postgres-and-mysql.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
