Mysql password encrypt

19 views
Skip to first unread message

Sachin Watane

unread,
Jul 27, 2016, 7:18:23 AM7/27/16
to VGLUG
Hello all,

i have  mysql database server and have cron on another server this cron is used  for taking the daily backup of database. In that cron i write the script with username and password of mysql for daily backup. Now want to encrypt the password of same. please suggest what to do.

Regards,
Sachin

shahid raza

unread,
Jul 31, 2016, 7:18:26 AM7/31/16
to VGLUG
Hi Sachin
I suggest to store your password in an option file. For example, on Unix, you can list your password in the [client] section of the .my.cnf file in your home directory:

[client]
password=your_pass

To keep the password safe, the file should not be accessible to anyone but yourself. To ensure this, set the file access mode to 400 or 600

Sachin Watane

unread,
Aug 17, 2016, 1:52:29 AM8/17/16
to VGLUG
Hello,

This option is not getting suitable because we have root access to all user. Is there any other option.

Regards,
Sachin
Reply all
Reply to author
Forward
0 new messages