x

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

2023-01-23 16:25:05编辑:野渡

请关注此标题,每天持续更新原创晾晒技术文章。

学习视频请在微信上搜索公众号“智传网优”,直接开始学习自助视频

1 .前言撰写本文主要是为了在RHEL8或CentOS8上安装MariaDB。

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

介绍如何在CentOS8或RHEL8上安装MariaDB数据库服务器。

CentOS8与MariaDB 10.3一起发行,与MySQL二进制兼容。

MariaDB 10.3是一个多用户、多线程的SQL数据库服务器。

在我以前的文章redhatenterpriseLinux8(RHEL8)的新功能和评论中可以找到所有的rhel8新功能

MariaDB是社区开发的MySQL关系数据库管理系统的一个分支。

这是一个快速、稳健的数据库服务器,在开发和改进的背后有一个巨大的社区。

如何在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上安装Maria db 10.3 rhel 8或centos8

在CentOS8或RHEL8上安装MariaDB 10.3

3.1步骤RHEL8升级系统sudodnf-yupdate3.2步骤在CentOS8或RHEL8上安装MariaDB数据库服务器MariaDB软件包可用于AppStream资料档案库中

sudodnfmoduleinstallmariadb在CentOS8或RHEL8上安装MariaDB数据库服务器

按y确认安装

transaction summary===================transaction summary===================================================

rpm-qimariad B- servername:Maria d B- server epoch:3 version:10.3.10 release:2.El 82039 dffd 8723 architecture:x86 ( x86 ) 70890 license:GPL v2 withexceptionsandlgplv2and BSD.signature:RSA/sha 256,Mon 15 Oct 2018 05:22:06 AM EDT, keyi d199 e 2f 91f d 431 d 51 source rpm:Maria d B- 10.3.10-2.El 82039 dffd 8723.src.rpmbuild date:fri 12 oct 201809:48:53am le ) Packager : Red Hat, Inc.http://bugzilla.red hat.com/bugzilla Inc.URL:http://Maria db.org summary:themariadbserverandrelatedfilesdescriptioon 多标题数据库服务器. itisaclient/serverimplementationconsistingofaserverdaemon ( mysqld )。 andmanydifferentclientprogramsandlibraries.thispackagecontainsthemariadbserverandsomeaccompanyingfilesanddirectories.Maria

3.3步骤在CentOS8或RHEL 8中启动并设置MariaDB,然后使用以下命令启动MariaDB服务以设置启动时的自动启动:

sudosystemctlenable-- nowmariadb通过在CentOS8或RHEL 8上启动MariaDB进行配置

服务启动后,运行命令mysql_secure_installation以增强MariaDB数据库服务器的安全性。

MySQL _ secure _ installation note:runningallpartsofthisscriptisrecommendedforallmariadbserversinproductionuse! PLEASE READ EACH STEP CAREFULLY!

nordertologintomariadbtosecureit,we ' llneedthecurrentpasswordfortherootuser.if you ' vejustinstalledmariadb,and you haven the password will be blank,so you should just press enter here。

企业密码( entercurrentpasswordforroot ):OK,successfully used password,moving on…

settingtherootpasswordensuresthatnobodycanlogintothemariadbrootuserwithouttheproperauthorisation。

set rootpassword [ y/n ] ynew password:re-enter new password:passwordupdatedsuccessfully! reloadingprivilegetables……success!

By default,amariadbinstallationhasananonymoususer, allowinganyonetologintomariadbwithouthavingtohaveauseraccountcreatedforthem.thisisintendedonlyfortesting, andtomaketheinstallationgoabitsmoother.youshouldremovethembeforemovingintoaproductionenvironment。

removeanonymoususers [ y/n ] y…success!

Normally,rootshouldonlybeallowedtoconnectfrom ' localhost '.thisensuresthatsomeonecannotguessatherootpasswordfromthenetwom

disallowrootloginremotely [ y/n ] y…success!

By default,mariadbcomeswithadatabasenamed ' test ' thatanyonecanaccess.thisisalsointendedonlyfortesting,andshouldberemover

removetestdatabaseandaccesstoit [ y/n ] y

Dropping test database…… Success! removingprivilegesontestdatabase . success! reloadingtheprivilegetableswillensurethatallchangesmadesofarwilltakeeffectimmediately。

reloadprivilegetablesnow [ y/n ] y…success!

Cleaning up… .

全能! if you ' vecompletedalloftheabovesteps,yourmariadbinstallationshouldnowbesecure。

Thanks for using MariaDB!

通过以上操作确保你:

设置数据库root用户密码删除匿名用户root用户远程登录并删除测试数据库,访问该数据库后,将无法使用root用户测试访问

MySQL-uroot-penter password:welcometothemariadbmonitor.command send with; org.yourmariadbconnectionidis 16 server version:10.3.10-mariadbmariadbserver

版权所有( c ) 2000,2018,Oracle,MariaDB Corporation Ab and others。

类型帮助;' or 'h ' forhelp.type 'coclearthecurrentinputstatement。

Mariadb[(none ) ]选择版本; -------------|version () ) () () () ( ) ) ( mariadb )-- ( ) ) ) ) ) mariadb ) )

4 .总结在本教程中,您现在可以在CentOS8或RHEL8上安装MariaDB数据库服务器。

有关通过web界面管理MariaDB数据库服务器的信息,请参阅本指南,以了解如何在RHEL 8上安装和配置phpMyAdmin。

这篇文章同步到博客网站,尊重原创。 转载时,请在正文中附上以下链接。 https://liuxuetime/rmxx/1478.html点击了解更多,快速查看更多技术文章列表。

更多排行: