> For the complete documentation index, see [llms.txt](https://klouddb.gitbook.io/klouddb_shield/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://klouddb.gitbook.io/klouddb_shield/password-generator-postgres-and-mysql.md).

# 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
```
