[root@srv1 ~]# yum install mariadb-server -y
[root@srv1 ~]# vim /etc/my.cnf
# 于[mysqld]区段追加如下内容
character-set-server=utf8
[root@srv1 ~]# systemctl enable --now mariadb
[root@srv1 ~]# mysql_secure_installation
# 数据库初始化过程忽略.......
[root@srv1 ~]# mysql -u root -p
Enter password:
MariaDB [(none)]> create database wizard;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> grant all privileges on wizard.* to wizard@'localhost' identified by 'password';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> grant all privileges on wizard.* to wizard@'%' identified by 'password';
Query OK, 0 rows affected (0.01 sec)
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> exit
Bye
|