# pacman -S mariadb # mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql # /usr/bin/mysqld_safe --datadir='/var/lib/mysql' # systemctl start mysqld.service # mysql_secure_installation*** 下面是根据提示输入,默认就好,注意有一个地方是修改root密码,别直接回车。# systemctl enable mysqld