[root@T-Neo ~]# ipinfo
ens37: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.10.17 netmask 255.255.255.0 broadcast 192.168.10.255[root@T-Neo ~]# yum install mariadb-server -y
[root@T-neo ~]# vim /etc/my.cnf.d/server.cnf
skip_name_resolve=ON # 关闭域名解析
innodb_file_per_table=ON
log_bin=mysql-bin
[root@T-Neo ~]# systemctl start mariadb
[root@T-Neo ~]# ss -tnl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN050*:3306*:*LISTEN0128*:22*:*LISTEN0100127.0.0.1:25*:*LISTEN032:::21:::*LISTEN0128:::22:::*LISTEN0100::1:25[root@T-Neo ~]# mysql -uroot -proot # 一般直接输入 mysql 即可,如果通过 mysql_secure_installation 设置过密码,则需要通过相应的用户名密码进行登陆
Welcome to the MariaDB monitor. Commands end with; or \g.
Your MariaDB connection id is 3
Server version:5.5.64-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)]>CREATEDATABASE wp # 创建 wordpress 数据库
Query OK,1 row affected(0.00 sec)
MariaDB [(none)]> grant all on wp.* to wp_admin@'192.168.%' identified by 'root'; # 授权用户和密码
Query OK,0 rows affected(0.00 sec)
MariaDB [(none)]> flush privileges; # 立即生效
Query OK,0 rows affected(0.00 sec)