如何在Fedora 37上安装MySQL
admin
2023-07-31 20:51:22
0

MySQL是一种流行且广泛使用的开源关系数据库管理系统(RDBMS),许多基于Web的应用程序使用它来存储和管理数据。其强大的功能集和灵活性使其成为从小型项目到企业级应用程序的各种不同用例的理想选择。MySQL-DatabaseMySQL-Database

在 Fedora 37 上安装 MySQL

第 1 步。在继续之前,请更新您的 Fedora 操作系统以确保所有现有软件包都是最新的。使用此命令更新服务器软件包:

sudo dnf upgrade
sudo dnf update

第 2 步。在 Fedora 37 上安装 MySQL。

默认情况下,MySQL 软件包不在 Fedora 37 的默认存储库中。现在运行以下命令将 MySQL 存储库添加到您的 Fedora 系统中:

sudo dnf install https://dev.mysql.com/get/mysql80-community-release-fc37-1.noarch.rpm

添加 MySQL Yum 仓库后,您可以通过运行以下命令在 Fedora 37 系统上安装 MySQL:

sudo dnf install mysql-community-server

安装完成后,通过运行以下命令启动 MySQL 服务:

sudo systemctl start mysqld
sudo systemctl enable mysqld

要验证是否已安装 MySQL,请运行以下命令:

mysql --version

第 3 步。保护 MySQL 安装。

MySQL附带了一个脚本,可以帮助您保护安装。若要运行此脚本,请键入以下命令:

sudo mysql_secure_installation

此命令将启动MySQL安全安装向导,该向导将指导您完成保护MySQL服务器的过程。系统将提示您设置 root 密码、删除匿名用户、禁用远程 root 登录以及删除测试数据库。按照提示完成设置。

输出:

Securing the MySQL server deployment.

Enter password for user root: 

The existing password for the user account root has expired. Please set a new password.

New password: 

Re-enter new password: 
The \'validate_password\' component is installed on the server.
The subsequent steps will run with the existing configuration
of the component.
Using existing password for root.

Estimated strength of the password: 100 
Change the password for root ? ((Press y|Y for Yes, any other key for No) : y

New password: 

Re-enter new password: 

Estimated strength of the password: 100 
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.

Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Success.

Normally, root should only be allowed to connect from
\'localhost\'. This ensures that someone cannot guess at
the root password from the network.

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
Success.

By default, MySQL comes with a database named \'test\' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.

Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
 - Dropping test database...
Success.

 - Removing privileges on test database...
Success.

Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.

Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.

All done!

感谢您使用本教程在您的 Fedora 37 系统上安装 MySQL 数据库。有关其他帮助或有用信息,我们建议您查看MySQL官方网站。

相关内容

热门资讯

Windows 11 和 10... Windows 11/10 文件夹属性中缺少共享选项卡 – 已修复 1.检查共享选项卡是否可用 右键...
Radmin VPN Wind... Radmin VPN 是一款免费且用户友好的软件,旨在牢固地连接计算机以创建一个有凝聚力的虚拟专用网...
如何修复 Steam 内容文件... Steam 内容文件锁定是当您的 Steam 文件无法自行更新时出现的错误。解决此问题的最有效方法之...
事件 ID 7034:如何通过... 点击进入:ChatGPT工具插件导航大全 服务控制管理器 (SCM) 负责管理系统上运行的服务的活动...
在 Windows 11 中打... 什么是链路状态电源管理? 您可以在系统控制面板的电源选项中看到链接状态电源管理。它是 PCI Exp...
Hive OS LOLMine... 目前不清退的交易所推荐: 1、全球第二大交易所OKX欧意 国区邀请链接: https://www.m...
在 iCloud 上关闭“查找... 如果您是 Apple 的长期用户,您肯定会遇到过 Find My 应用程序,它本机安装在 iPhon...
farols1.1.501.0... faro ls 1.1.501.0(64bit)可以卸载,是一款无需连接外部PC机或笔记本计算机即可...
如何在 iPhone 14 P... Apple 的 iPhone 14 Pro 是第一款配备 48MP 传感器的 iPhone。所有以前...
balenaEtcher烧录后... balenaEtcher烧录后u盘或者内存卡无法识别不能使用的解决方法想要恢复原来的方法,使用win...