You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/etc/init.d/mysqld restart
# mysql and instead, a high credential nittanydbo is created
mysql_install_db
# used for random password generation
COUNTER=0
char=(0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V X W Y Z)
max=${#char[*]}
# generate a random 30 digit password
pass=''
for i in `seq 1 30`
do
let "rand=$RANDOM % 62"
pass="${pass}${char[$rand]}"
done
# make mysql secure so no one knows the password except this script
cat <<EOF | mysql_secure_installation
Y
$pass
$pass
Y
Y
Y
Y
EOF
# generate a password for the nittanydbo account
dbopass=''
for i in `seq 1 30`
do
let "rand=$RANDOM % 62"
dbopass="${pass}${char[$rand]}"
done
# now make an nittanydbo
cat <<EOF | mysql -u root --password=$pass
CREATE USER 'nittanydbo'@'localhost' IDENTIFIED BY '$dbopass';
GRANT ALL PRIVILEGES ON *.* TO 'nittanydbo'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit;
EOF
right now this is being treated as a development environment.
well.. https://github.com/psudug/nittany-vagrant/blob/master/scripts/_nonvagrant/newserver.sh happened and now these scripts will run on any CentOS 6.5 box they are copy and pasted into the terminal of. Unfortunately OOTB it currently doesn't do any mysql securing. So... we need to fix that
The text was updated successfully, but these errors were encountered: