# Login file at proxySQL - PXC 8.0

**URL:** https://forums.percona.com/t/login-file-at-proxysql-pxc-8-0/9527
**Category:** Polyglot Projects
**Created:** [March 3, 2021, 5:40pm UTC](https://forums.percona.com/t/login-file-at-proxysql-pxc-8-0/9527 "2021-03-03T17:40:45Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![AneeshBabu](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/aneeshbabu/32/1393_2.png) [@AneeshBabu](https://forums.percona.com/u/AneeshBabu)
#### Post date: [March 3, 2021, 5:40pm UTC](https://forums.percona.com/t/login-file-at-proxysql-pxc-8-0/9527/1 "2021-03-03T17:40:45Z")

</div>

Hi there ,  
Successfully prepared ProxySQL Admin File - `/etc/proxysql-admin.cnf`.  
how do i confiugure the login file…?

let me know how to proceed …?

---

<div class="post-metadata">

### Author: ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)
#### Post date: [March 3, 2021, 8:18pm UTC](https://forums.percona.com/t/login-file-at-proxysql-pxc-8-0/9527/2 "2021-03-03T20:18:32Z")

</div>

You can login to proxysql using `mysql -h 127.0.0.1 -P 6032 -uadmin -padmin`

---

<div class="post-metadata">

### Author: ![AneeshBabu](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/aneeshbabu/32/1393_2.png) [@AneeshBabu](https://forums.percona.com/u/AneeshBabu)
#### Post date: [March 3, 2021, 9:03pm UTC](https://forums.percona.com/t/login-file-at-proxysql-pxc-8-0/9527/3 "2021-03-03T21:03:01Z")

</div>

i mean Creating the login file as below  
at - [Redirecting](https://www.percona.com/doc/percona-xtradb-cluster/LATEST/howtos/proxysql-v2.html#limitations)  
Creating the login file

The following steps encrypt the login:

```
Create the unencrypted data
Encrypt the data with the proxysql-login-file script
Use the login-file with proxysql-admin

# create the file as shown above
 $ echo "monitor.user=monitor" > data.cnf
 $ echo "monitor.password=password" >> data.cnf

 # Choose a secret password
 $ passwd="secret"

 # Method (1) : Encrypt this data with --password
 $ proxysql-login-file --in data.cnf --out login-file.cnf --password=${passwd}

 # Method (2a) : Encrypt the data with --password-file
 # Sending the password via the command-line is insecure,
 # it's better to use --password-file so that the
 # password doesn't show up in the command-line
 $ proxysql-login-file --in data.cnf --out login-file.cnf \
    --password-file=<(echo "${passwd}")

 # Method (2b) : Running the command using sudo does not work with
                 bash's process substitution. In this case, send the
                 password by stdin is another option
 $ sudo echo "${passwd}" | proxysql-login-file --in data.cnf --out \
   login-file.cnf --password-file=/dev/stdin

 # Method (3) : The script will prompt for the password
 # if no password is provided via the command-line options.
 $ proxysql-login-file --in data.cnf --out login-file.cnf

 # Remove the unencrypted data file
 $ rm data.cnf

 # Call the proxysql-admin script with the login-file
 $ proxysql-admin --enable --login-file=login-file.cnf \
    --login-password-file=<(echo "${passwd}")

 # Call proxysql-status with the login-file
 $ proxysql-status --login-file=login-file.cnf \
    --login-password-file=<(echo "${passwd}")

```

---

<div class="post-metadata">

### Author: ![AneeshBabu](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/aneeshbabu/32/1393_2.png) [@AneeshBabu](https://forums.percona.com/u/AneeshBabu)
#### Post date: [March 4, 2021, 7:56pm UTC](https://forums.percona.com/t/login-file-at-proxysql-pxc-8-0/9527/4 "2021-03-04T19:56:54Z")

</div>

can anyone look into this .?

---

<div class="post-metadata">

### Author: ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)
#### Post date: [March 4, 2021, 8:54pm UTC](https://forums.percona.com/t/login-file-at-proxysql-pxc-8-0/9527/5 "2021-03-04T20:54:01Z")

</div>

Hi Aneesh,  
These forums are not official paid support from Percona. People volunteer their free time to help the community. If you’d like a faster answer, please contact us for direct support.

I will also tell you that in our official ProxySQL training, we do not use the file method that you are using. You simply log in to the admin interface and config as needed.
