For SUSE Linux Enterprise Server: On the controller node, install the MySQL client and server packages, and the Python library.
# zypper install mysql-client mysql python-mysql
For openSUSE: On the controller node, install the MariaDB client and database server packages, and the MySQL Python library.
# zypper install mariadb-client mariadb python-mysql
The MySQL configuration requires some changes to work with OpenStack.
Edit the
/etc/my.cnf
file:Under the
[mysqld]
section, set thebind-address
key to the management IP address of the controller node to enable access by other nodes via the management network:[mysqld] ... bind-address = 10.0.0.11
Under the
[mysqld]
section, set the following keys to enable InnoDB, UTF-8 character set, and UTF-8 collation by default:[mysqld] ... default-storage-engine = innodb collation-server = utf8_general_ci init-connect = 'SET NAMES utf8' character-set-server = utf8
Start the MariaDB or MySQL database server and set it to start automatically when the system boots:
# service mysql start # chkconfig mysql on
Finally, you should set a root password for your MariaDB or MySQL database. The OpenStack programs that set up databases and tables prompt you for this password if it is set.
You must delete the anonymous users that are created when the database is first started. Otherwise, database connection problems occur when you follow the instructions in this guide. To do this, use the mysql_secure_installation command. Note that if mysql_secure_installation fails you might need to use mysql_install_db first:
# mysql_install_db # mysql_secure_installation
If you have
not already set a root database password, press
ENTER when you are prompted for the
password. This command presents a number of options
for you to secure your database installation. Respond
yes
to all prompts unless you have a
good reason to do otherwise.