debian安装mysql
介绍 (Introduction)
MySQL is a prominent open source database management system used to store and retrieve data for a wide variety of popular applications. MySQL is the M in the LAMP stack, a commonly used set of open source software that also includes Linux, the Apache web server, and the PHP programming language.
MySQL是一个杰出的开源数据库管理系统,用于存储和检索各种流行应用程序的数据。 MySQL是LAMP堆栈中的M , LAMP堆栈是一组常用的开源软件,还包括Linux,Apache Web服务器和PHP编程语言。
In Debian 10, MariaDB, a community fork of the MySQL project, is packaged as the default MySQL variant. While MariaDB works well in most cases, if you need features found only in Oracle’s MySQL, you can install and use packages from a repository maintained by the MySQL developers.
在Debian 10中,MariaDB(MySQL项目的一个社区分支)被打包为默认MySQL变体。 尽管MariaDB在大多数情况下都能正常运行,但是如果您需要仅在Oracle MySQL中才能找到的功能,则可以从MySQL开发人员维护的存储库中安装和使用软件包。
To install the latest version of MySQL, we’ll add this repository, install the MySQL software itself, secure the install, and finally we’ll test that MySQL is running and responding to commands.
要安装最新版本MySQL,我们将添加此存储库,安装MySQL软件本身,确保安装的安全性,最后我们将测试MySQL是否正在运行并响应命令。
先决条件 (Prerequisites)
Before starting this tutorial, you will need:
在开始本教程之前,您需要:
One Debian 10 server set up by following this initial server setup guide, including a non-root user with
sudo
privileges and a firewall.通过遵循此初始服务器设置指南来设置一台Debian 10服务器,包括具有
sudo
特权的非root用户和防火墙。
第1步-添加MySQL软件存储库 (Step 1 — Adding the MySQL Software Repository)
The MySQL developers provide a .deb
package that handles configuring and installing the official MySQL software repositories. Once the repositories are set up, we’ll be able to use Debian’s standard apt
command to install the software.
MySQL开发人员提供了一个.deb
软件包,用于配置和安装官方MySQL软件存储库。 设置好存储库后,我们将能够使用Debian的标准apt
命令来安装软件。
Before we do this, we need to install the prerequisite GnuPG package, an open-source implementation of the OpenPGP standard.