openstack chapter 5-configure mysql

1. Install related packages
yum install mariadb mariadb-server python2-PyMySQL -y

2. Create and edit the file and just
copy the entire command below. This is echo and write directly #Note
that the IP is replaced with your own
Vim /etc/my.cnf.d/openstack.cnf 

[mysqld]
bind-address = 192.168.244.133
default-storage-engine = innodb
innodb_file_per_table
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8

openstack chapter 5-configure mysql

3. Start and set to boot

systemctl enable mariadb.service
systemctl start mariadb.service

4. Set the password
mysql_secure_installation
Enter current password for root (enter for none): The first step is to press Enter
Set root password? [Y/n] Select Y to
enter the password, and remember the password you entered.
Remove anonymous users? Select Yes, move Except for anonymous users,
Disallow root login remotely? You can choose No here. If it is only a test environment, do not prohibit root remote login.
Remove test database and access to it? [Y/n] Choose Yes
Reload privilege tables now? [Y/n] Choose Yes

5. Login to test
Mysql -u root -p and
enter the password

show databases, view the database
openstack chapter 5-configure mysql

So far the mysql part is installed.

Follow-up, mysql and mariadb instructions

First of all, if you want to see the ranking of major databases, you can check it through this website
https://db-engines.com/en/ranking

The address of mariadb
https://mariadb.org/

There is a saying on the official website that
MariaDB Server is one of the most popular open source relational databases. It is made by the original developers of MySQL and is guaranteed to remain open source.
We know that Mysql was acquired by oracle, and there may be a risk of closed source in the future, so we separated mariadb.
So openstack also uses mariadb.
I won’t list the detailed comparison between mysql and mariadb here. There are a lot of online ones, and you can check it out if you’re interested, but there is a certain mysql foundation that is not difficult for this installation. .

MariaDB vs MySQL – Comparing MySQL 8.0 with MariaDB 10.3
https://www.eversql.com/mariadb-vs-mysql/

Guess you like

Origin blog.51cto.com/11125450/2546710