首页 » 网站推广 » php设置装备摆设marialdb技巧_若安在CentOS8或者RHEL8系统上安装MariaDB

php设置装备摆设marialdb技巧_若安在CentOS8或者RHEL8系统上安装MariaDB

访客 2024-11-29 0

扫一扫用手机浏览

文章目录 [+]

如需学习视频,请在微信搜索"大众年夜众号“智传网优”直接开始自助视频学习

1. 序言

本文紧张是为帮助您在RHEL8或CentOS8上安装MariaDB而编写的。
讲解如何在CentOS8或RHEL8上安装MariaDB数据库做事器。
CentOS8是与MariaDB 10.3一起发布的,它与MySQL是二进制兼容的。
MariaDB 10.3是一个多用户、多线程的SQL数据库做事器。
你可以在我之前的文章Red Hat Enterprise Linux 8 (RHEL 8)的新特性和评论中找到所有的RHEL8新特性

php设置装备摆设marialdb技巧_若安在CentOS8或者RHEL8系统上安装MariaDB

MariaDB是一个社区开拓的MySQL关系型数据库管理系统的分支。
它是一个快速和健壮的数据库做事器,在它的开拓和改进背后有一个巨大的社区。

php设置装备摆设marialdb技巧_若安在CentOS8或者RHEL8系统上安装MariaDB
(图片来自网络侵删)

如何在CentOS8或者RHEL8系统上安装MariaDB

2. RHEL8 上的 MariaDB 10.3版本 vs RHEL7系统上的5.5版本

MariaDB 10.3在RHEL 8中供应了比在RHEL 7中供应的5.5更多的新特性。
一些新的变革是:

InnoDB被用作默认的存储引擎,而不是XtraDB。
System-versioned表FOR循环MariaDB Galera集群是一个同步多主集群,现在是MariaDB的标准部分。
序列即时添加列InnoDB看不见的列并行复制多源复制公共表表达式独立于存储引擎的列压缩3. 在CentOS8或RHEL8上安装MariaDB 10.3

按照以下步骤在RHEL8或CentOS8上安装和配置MariaDB 10.3。

在CentOS8或RHEL8上安装MariaDB 10.3

3.1 步骤1: 升级你的RHEL 8系统

sudo dnf -y update3.2 步骤2: 在CentOS8或RHEL8上安装MariaDB数据库做事器

mariadb包在AppStream存储库中可用,可以通过运行以下命令来安装:

sudo dnf module install mariadb

在CentOS8或RHEL8上安装MariaDB数据库做事器

按下y确认安装

Transaction Summary=======================================================================================================================================================Install  13 PackagesTotal download size: 32 MInstalled size: 164 MIs this ok [y/N]: y

检讨MariaDB的安装情形

rpm -qi mariadb-server

Name : mariadb-serverEpoch : 3Version : 10.3.10Release : 2.el8+2039+dffd8723Architecture: x86_64Install Date: Sat 01 Dec 2018 04:31:39 AM ESTGroup : UnspecifiedSize : 87570890License : GPLv2 with exceptions and LGPLv2 and BSD.Signature : RSA/SHA256, Mon 15 Oct 2018 05:22:06 AM EDT, Key ID 199e2f91fd431d51Source RPM : mariadb-10.3.10-2.el8+2039+dffd8723.src.rpmBuild Date : Fri 12 Oct 2018 09:48:53 AM EDTBuild Host : x86-vm-05.build.eng.bos.redhat.comRelocations : (not relocatable)Packager : Red Hat, Inc. http://bugzilla.redhat.com/bugzillaVendor : Red Hat, Inc.URL : http://mariadb.orgSummary : The MariaDB server and related filesDescription :MariaDB is a multi-user, multi-threaded SQL database server. It is aclient/server implementation consisting of a server daemon (mysqld)and many different client programs and libraries. This package containsthe MariaDB server and some accompanying files and directories.MariaDB is a community developed branch of MySQL.

3.3 步骤3: 在CentOS8或者RHEL 8上启动和配置MariaDB

利用下面的命令激活mariadb做事,即设置开机自启动:

sudo systemctl enable --now mariadb

在CentOS8或者RHEL 8上启动和配置MariaDB

做事启动后,运行命令mysql_secure_installation来加强MariaDB数据库做事器的安全性。

mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDBSERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the currentpassword for the root user. If you've just installed MariaDB, andyou haven't set the root password yet, the password will be blank,so you should just press enter here.

Enter current password for root (enter for none):OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MariaDBroot user without the proper authorisation.

Set root password? [Y/n] yNew password:Re-enter new password:Password updated successfully!Reloading privilege tables..… Success!

By default, a MariaDB installation has an anonymous user, allowing anyoneto log into MariaDB without having to have a user account created forthem. This is intended only for testing, and to make the installationgo a bit smoother. You should remove them before moving into aproduction environment.

Remove anonymous users? [Y/n] y… Success!

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

Disallow root login remotely? [Y/n] y… Success!

By default, MariaDB comes with a database named 'test' that anyone canaccess. This is also intended only for testing, and should be removedbefore moving into a production environment.

Remove test database and access to it? [Y/n] y

Dropping test database…… Success!Removing privileges on test database…… Success!

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

Reload privilege tables now? [Y/n] y… Success!

Cleaning up…

All done! If you've completed all of the above steps, your MariaDBinstallation should now be secure.

Thanks for using MariaDB!

以上操作确保你:

设置数据库root用户密码删除匿名用户不许可root用户远程登录删除测试数据库并访问它

完成后,利用root用户测试访问

mysql -u root -p

Enter password:Welcome to the MariaDB monitor. Commands end with ; or \g.Your MariaDB connection id is 16Server version: 10.3.10-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> SELECT VERSION();+-----------------+| VERSION() |+-----------------+| 10.3.10-MariaDB |+-----------------+1 row in set (0.001 sec)

4. 总结

通过本教程,您现在可以在CentOS8或RHEL8上安装MariaDB数据库做事器了。
如果您更喜好通过web界面管理MariaDB数据库做事器,请参阅我们的指南,理解如何在RHEL 8上安装和配置phpMyAdmin。

本文已同步至博客站,尊重原创,转载时请在正文中附带以下链接:https://www.linuxrumen.com/rmxx/1478.html点击理解更多,快速查看更多的技能文章列表。

标签:

相关文章

丰镇市,历史文化与现代发展的交融之地

丰镇市,位于我国内蒙古自治区乌兰察布市中部,是一座历史悠久的城市。自古以来,这里就是兵家必争之地,也是南北文化交流的重要通道。如今...

网站推广 2024-12-23 阅读0 评论0

串行通信协议,构筑现代通信的基石

随着信息技术的飞速发展,通信技术在各个领域都扮演着至关重要的角色。而在众多的通信方式中,串行通信因其高效、可靠的特点,成为了构筑现...

网站推广 2024-12-23 阅读0 评论0

主播推广协议,开启新媒体营销新时代

随着互联网的快速发展,新媒体营销已成为企业品牌推广的重要手段。其中,主播推广以其独特的优势,受到越来越多企业的青睐。在主播推广的过...

网站推广 2024-12-23 阅读0 评论0

主板代码F,介绍计算机心脏的神秘面纱

在科技飞速发展的今天,计算机已经成为了我们生活中不可或缺的一部分。而主板,作为计算机的核心组成部分,承载着整个系统的稳定运行。主板...

网站推广 2024-12-23 阅读0 评论0