・ユーザー・データベースの作成
[root@alma]# mysql -u root -p********※******** = パスワード
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 11
Server version: 10.5.27-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> create user cloudusr@localhost identified by '******';※データベースにユーザー cloudusr 追加 ****** = パスワード
MariaDB [(none)]> select host,user from mysql.user;※ユーザー確認
+-----------+-------------+
| Host| User|
+-----------+-------------+
| localhost | cloudusr|※ユーザー cloudusr を確認
| localhost | mariadb.sys |
| localhost | mysql|
| localhost | root|
+-----------+-------------+
4 rows in set (0.001 sec)
MariaDB [(none)]> create database cloud;※データベース cloud 新規作成
MariaDB [(none)]> show databases;※データベース確認
+--------------------+
| Database|
+--------------------+
| cloud|※データベース cloud を確認
| information_schema |
| mysql|
| performance_schema |
+--------------------+
4 rows in set (0.001 sec)
MariaDB [(none)]> grant all privileges on cloud.* to cloudusr@localhost identified by '******';※データベースへのユーザー cloudusr のアクセス権設定 ****** = パスワード
MariaDB [(none)]> exit※終了