Create a database named glance
sudo mysql -uroot -pmygreatsecret -e 'CREATE DATABASE glance;'
Create a user named glancedbadmin
sudo mysql -uroot -pmygreatsecret -e 'CREATE USER glancedbadmin;'
Grant all privileges for glancedbadmin on the Database "glance".
sudo mysql -uroot -pmygreatsecret -e "GRANT ALL PRIVILEGES ON glance.* TO 'glancedbadmin'@'%' ;"
Create a password for the user "glanceadmin"
sudo mysql -uroot -pmygreatsecret -e "SET PASSWORD FOR 'glancedbadmin'@'%' = PASSWORD('glancesecret');"Edit the file /etc/glance/glance-registry.conf and edit the line which contains the option "sql_connection =" to this:
sql_connection = mysql://glancedbadmin:glancesecret@10.10.10.2/glance
Restart glance-registry after making changes to /etc/glance/glance-registry.conf
sudo restart glance-registry
