Login file at proxySQL - PXC 8.0

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

let me know how to proceed …?

1 Like

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

1 Like

i mean Creating the login file as below
at - 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}")
1 Like

can anyone look into this .?

1 Like

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.

1 Like