介绍 (Introduction)
MariaDB is an open-source database management system, commonly used as an alternative for the MySQL portion of the popular LAMP (Linux, Apache, MySQL, PHP/Python/Perl) stack. It is intended to be a drop-in replacement for MySQL.
MariaDB是一个开源数据库管理系统,通常用作流行的LAMP (Linux,Apache,MySQL,PHP / Python / Perl)堆栈MySQL部分的替代方案。 它旨在替代MySQL。
The short version of this installation guide consists of these three steps:
本安装指南的简短版本包括以下三个步骤:
Update your package index using
apt
使用
apt
更新您的软件包索引Install the
mariadb-server
package usingapt
. The package also pulls in related tools to interact with MariaDB使用
apt
安装mariadb-server
软件包。 该软件包还引入了与MariaDB交互的相关工具Run the included
mysql_secure_installation
security script to restrict access to the server运行附带的
mysql_secure_installation
安全脚本以限制对服务器的访问
- sudo apt update sudo apt更新
- sudo apt install mariadb-server sudo apt安装mariadb-server
- sudo mysql_secure_installation 须藤mysql_secure_installation
This tutorial will explain how to install MariaDB on an Ubuntu 18.04 server, and verify that it is running and has a safe initial configuration.
本教程将说明如何在Ubuntu 18.04服务器上安装MariaDB,并验证其是否正在运行并具有安全的初始配置。
先决条件 (Prerequisites)
To follow this tutorial, you will need:
要遵循本教程,您将需要:
One Ubuntu 18.04 server set up by following this initial server setup guide, including a non-root user with
sudo
privileges and a firewall.按照此初始服务器设置指南设置一台Ubuntu 18.04服务器,其中包括具有
sudo
特权的非root用户和防火墙。
第1步-安装MariaDB (Step 1 — Installing MariaDB)
On Ubuntu 18.04, MariaDB version 10.1 is included in the APT package repositories by default.
在Ubuntu 18.04上,默认情况下APT软件包存储库中包含Mar