root@Server01:~# apt -y install mariadb-server
root@Server01:~# mysql_secure_installation #运行安全脚本:
第一个直接按回车
第二个按y输入数据库root的密码
其余的都是直接按y
增加一个超级用户用于网页端管理,新版的 MariaDB 与 MySQL 已不允许用户使用 root 在命令行以外的场合登录
root@Server01:~# mysql -uroot -pSkill21!
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 83
Server version: 10.3.23-MariaDB-0+deb10u1 Debian 10
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
M