Last active
October 28, 2015 03:35
-
-
Save daleysoftware/82d9b4dbe126c68c2861 to your computer and use it in GitHub Desktop.
Set the AeroFS MySQL database password
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bin/bash | |
set -eu | |
# Revoke old open grants, add new password protected local-only grants. | |
mysql --user=root << EOF | |
revoke all privileges on \`polaris\`.* from 'aerofsdb'@'%'; | |
revoke all privileges on \`bifrost\`.* from 'aerofsdb'@'%'; | |
revoke all privileges on \`aerofs_sp\`.* from 'aerofsdb'@'%'; | |
revoke all privileges on \`aerofs_ca\`.* from 'aerofsdb'@'%'; | |
grant all privileges on \`polaris\`.* to 'aerofsdb'@'localhost' identified by 'your-db-password-here'; | |
grant all privileges on \`bifrost\`.* to 'aerofsdb'@'localhost' identified by 'your-db-password-here'; | |
grant all privileges on \`aerofs_sp\`.* to 'aerofsdb'@'localhost' identified by 'your-db-password-here'; | |
grant all privileges on \`aerofs_ca\`.* to 'aerofsdb'@'localhost' identified by 'your-db-password-here'; | |
set password for root@'localhost' = password('your-root-password-here'); | |
EOF | |
# Add AeroFS configuration (must use same password as above). | |
echo 'mysql_password=your-db-password-here' >> /opt/config/properties/external.properties |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment