Controller — MariaDB

Install MariaDB

  1. [root@controller ~]# yum install mariadb mariadb-server -y
  1. <h3>Configure MariaDB For OpenStack</h3>
  2. [root@controller ~]# cat /etc/my.cnf.d/mariadb-openstack.cnf
  3. [mysqld]
  4. default-storage-engine = innodb
  5. innodb_file_per_table
  6. collation-server = utf8_general_ci
  7. init-connect = 'SET NAMES utf8'
  8. character-set-server = utf8
  9. bind-address = 10.1.1.61

Start MariaDB Service

  1. [root@controller ~]# systemctl enable mariadb.service
  2. [root@controller ~]# systemctl restart mariadb.service
  3. [root@controller ~]# systemctl status mariadb.service

List MariaDB Service

  1. [root@controller ~]# systemctl list-unit-files |grep mariadb.service
  2. <strong>mariadb.service enabled</strong>

MariaDB Installation

  1. [root@controller ~]# mysql_secure_installation
  1. [root@controller ~]# mysql -u root -p

Create Database For OpenStack

  1. CREATE DATABASE keystone;
  2. GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY 'password';
  3. GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY 'password';
  4.  
  5. CREATE DATABASE glance;
  6. GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY 'password';
  7. GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY 'password';
  8.  
  9. CREATE DATABASE nova;
  10. CREATE DATABASE nova_api;
  11. CREATE DATABASE nova_cell0;
  12.  
  13. GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY 'password';
  14. GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY 'password';
  15. GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost' IDENTIFIED BY 'password';
  16. GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%' IDENTIFIED BY 'password';
  17. GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'localhost' IDENTIFIED BY 'password';
  18. GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%' IDENTIFIED BY 'password';
  19. FLUSH PRIVILEGES;
  20.  
  21. CREATE DATABASE neutron;
  22. GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'password';
  23. GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'password';

Leave a Reply

Your email address will not be published. Required fields are marked *