● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset:
Active: active (running) since Sat 2021-04-22 13:55:49 PDT; 21s ago
...
● mariadb.service - MariaDB 10.3.15 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2021-04-22 14:36:28 PDT; 19min ago
Docs: man:mysqld(8) https://mariadb.com/kb/en/library/systemd/
Main PID: 4509 (mysqld)
Status: "Taking your SQL requests now..."
Tasks: 30 (limit: 2359)
Memory: 78.6M
CGroup: /system.slice/mariadb.service
└─4509 /usr/sbin/mysqld
如果服务没有启动,你可以尝试用使用如下命令进行启动:
sudo systemctl start mariadb
复制代码
MariaDB数据安装完成后,为提升数据库的安全性,建议使用如下命令进行安装加固:
sudo mysql_secure_installation
复制代码
命令执行后,你将会在终端中得到提示,基本上你一路输入Y即可。
<p>...</p><p>Enter current password for root (enter for none):</p><p>...</p><p>Set root password? [Y/n] Y</p><p>New password: </p><p>Re-enter new password: </p><p>...</p><p>Remove anonymous users? [Y/n] Y</p><p>...</p><p>Disallow root login remotely? [Y/n] Y</p><p>...</p><p>Remove test database and access to it? [Y/n] Y</p><p>...</p><p>Reload privilege tables now? [Y/n] Y</p><p>...</p><p>Thanks for using MariaDB!</p>