'echo "create database cloud_tug_of_war" | mysql -u root\n'
'\n'
'echo "create table clouds ( cloud_id INT AUTO_INCREMENT, name VARCHAR(255) NOT NULL, value INT, max_value INT, PRIMARY KEY (cloud_id))" | mysql -u root cloud_tug_of_war\n'
'\n'
'echo "CREATE USER \'cloud_tug_of_war\'@\'%\' IDENTIFIED BY \'cloudpass\';" | mysql -u root\n'
'echo "GRANT ALL PRIVILEGES ON cloud_tug_of_war.* TO \'cloud_tug_of_war\'@\'%\';" | mysql -u root\n'
'echo "FLUSH PRIVILEGES" | mysql -u root\n'
)
# if you only have one VPC, vpc_id can be retrieved using:
'echo "create database cloud_tug_of_war" | mysql -u root\n'
'\n'
'echo "create table clouds ( cloud_id INT AUTO_INCREMENT, name VARCHAR(255) NOT NULL, value INT, max_value INT, PRIMARY KEY (cloud_id))" | mysql -u root cloud_tug_of_war\n'
'\n'
'echo "CREATE USER \'cloud_tug_of_war\'@\'%\' IDENTIFIED BY \'cloudpass\';" | mysql -u root\n'
'echo "GRANT ALL PRIVILEGES ON cloud_tug_of_war.* TO \'cloud_tug_of_war\'@\'%\';" | mysql -u root\n'
'echo "FLUSH PRIVILEGES" | mysql -u root\n'
)
# convert user-data from script with: cat install-mysql | sed "s/^/'/; s/$/\\\n'/"
'echo "create database cloud_tug_of_war" | mysql -u root\n'
'\n'
'echo "create table clouds ( cloud_id INT AUTO_INCREMENT, name VARCHAR(255) NOT NULL, value INT, max_value INT, PRIMARY KEY (cloud_id))" | mysql -u root cloud_tug_of_war\n'
'\n'
'echo "CREATE USER \'cloud_tug_of_war\'@\'%\' IDENTIFIED BY \'cloudpass\';" | mysql -u root\n'
'echo "GRANT ALL PRIVILEGES ON cloud_tug_of_war.* TO \'cloud_tug_of_war\'@\'%\';" | mysql -u root\n'
'echo "FLUSH PRIVILEGES" | mysql -u root\n'
)
# convert with: cat install-mysql | sed "s/^/'/; s/$/\\\n'/"