<commit_before>#!/bin/bash

read -p "Enter a password to be used for the OpenStack services (nova, glance, keystone): " service_pass

echo "#######################################################################################"
echo "Setting up MySQL now.  You will be prompted for an admin password by the setup process."
echo "#######################################################################################"
echo ""

# mysql
apt-get install -y mysql-server python-mysqldb

# make mysql listen on 0.0.0.0
sudo sed -i '/^bind-address/s/127.0.0.1/0.0.0.0/g' /etc/my.cnf

# restart
service mysql restart

# wait for restart
sleep 4 

echo "#######################################################################################"
echo "Creating OpenStack databases and users.  Use your database password when prompted."
echo "#######################################################################################"

mysql -u root -p <<EOF
CREATE DATABASE nova;
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY '$service_pass';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY '$service_pass';
CREATE DATABASE glance;
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY '$service_pass';
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY '$service_pass';
CREATE DATABASE keystone;
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY '$service_pass';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY '$service_pass';
EOF
<commit_msg>fixed path for mysql config.<commit_after>#!/bin/bash

read -p "Enter a password to be used for the OpenStack services (nova, glance, keystone): " service_pass

echo "#######################################################################################"
echo "Setting up MySQL now.  You will be prompted for an admin password by the setup process."
echo "#######################################################################################"
echo ""

# mysql
apt-get install -y mysql-server python-mysqldb

# make mysql listen on 0.0.0.0
sudo sed -i '/^bind-address/s/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf

# restart
service mysql restart

# wait for restart
sleep 4 

echo "#######################################################################################"
echo "Creating OpenStack databases and users.  Use your database password when prompted."
echo "#######################################################################################"

mysql -u root -p <<EOF
CREATE DATABASE nova;
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY '$service_pass';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY '$service_pass';
CREATE DATABASE glance;
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY '$service_pass';
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY '$service_pass';
CREATE DATABASE keystone;
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY '$service_pass';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY '$service_pass';
EOF

{'fraction_non_alphanumeric': 0.31534733441033924, 'fraction_numerical': 0.009693053311793215, 'mean_word_length': 6.250585480093677, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1412265', 'n_tokens_mistral': 957, 'n_tokens_neox': 884, 'n_words': 306}