Many OpenStack services maintain a database to keep track of critical resources, usage, and other information. By default, individual SQLite databases are specified for this purpose and are useful for the single-node configuration. For multi-node configurations, a MySQL database is recommended for storing this information.
Use the primary IP address of the Controller node to determine the primary name associated with that node.
controller# getent hosts controller-IP controller-IP controller-name
controller# pkg install mysql-55
controller# pkg install mysql-55/client
controller# svcadm enable mysql:version_55
controller# mysqladmin –u root password MySQL-root-password
Create the tables that will be used by OpenStack. Grant privileges to the services on the Controller node in order to provide exclusive access to these databases. Use the controller-name that was output by the previous getent hosts command.
controller# mysql –u root –p Enter password: MySQL-root-password mysql> create database cinder; mysql> grant all privileges on cinder.* \ -> to 'cinder'@'controller-name' \ -> identified by 'cinder'; mysql> create database glance; mysql> grant all privileges on glance.* \ -> to 'glance'@’controller-name’ \ -> identified by 'glance'; mysql> create database keystone; mysql> grant all privileges on keystone.* \ -> to 'keystone'@’controller-name’ \ -> identified by 'keystone'; mysql> create database nova; mysql> grant all privileges on nova.* \ -> to 'nova'@’controller-name’ \ -> identified by 'nova'; mysql> flush privileges; mysql> quit
controller# pkg install python-mysql