部署MariaDB数据库管理系统

目录

1、初始化MariaDB服务

         1.1 安装、启动数据库服务程序、将服务加入开机启动项中。

1.2 为保证数据库安全性和正常运转,需要对数据库程序进行初始化操作。

1.3 配置防火墙,放行对数据库服务程序的访问请求,允许管理员root能远程访问数据库。

1.4 登录MariaDB数据库。

1.5 修改管理员密码


数据库是指按照特定结构来存储数据的数据仓库。

数据库管理系统是一种能对数据库中存放的数据进行建立、修改、删除、查找、维护等操作的软件程序。

1、初始化MariaDB服务

1.1 安装、启动数据库服务程序、将服务加入开机启动项中。
root@localhost ~]# yum install mariadb mariadb-server -y 
[root@localhost ~]# systemctl start mariadb 
[root@localhost ~]# systemctl enable mariadb 
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
1.2 为保证数据库安全性和正常运转,需要对数据库程序进行初始化操作。

5个步骤

步骤一:设置root管理员在数据库中的密码值

步骤二:设置root管理员在数据库中的专有密码。

步骤三: 随后删除匿名账户,并使用root管理员从远程登录数据库,以确保数据库上运行的业

务的安全性。

步骤四:删除默认的测试数据库,取消测试数据库的一系列访问权限。

步骤五:刷新授权列表,让初始化的设定立即生效。

[root@localhost ~]# mysql_secure_installation

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

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you 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 MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password: 
Re-enter new password: 
Sorry, passwords do not match.

New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB 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? [Y/n] 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? [Y/n] y
 ... Success!

By default, MariaDB 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? [Y/n] 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? [Y/n] y
 ... Success!

Cleaning up...

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

Thanks for using MariaDB!
[root@localhost ~]# 
1.3 配置防火墙,放行对数据库服务程序的访问请求,允许管理员root能远程访问数据库。

数据库服务程序默认使用的是3306端口。

1.4 登录MariaDB数据库。

-u 参数用来指定以 root 管理员的身份登录,

而-p参数用来验证该用户在数据库中的密码值。

1.5 修改管理员密码

  • 4
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
CloudStack是一种开源的云计算平台,可以用来建立和管理私有云、公共云和混合云环境。安装和部署CloudStack可以按照以下步骤进行: 1. 硬件要求:首先需要确保服务器硬件符合要求,包括CPU、内存、硬盘空间等。 2. 操作系统安装:选择支持的操作系统,如CentOS、Ubuntu等,并按照官方文档的指引进行安装。 3. 网络配置:为CloudStack配置网络环境,包括管理网络、公共网络、存储网络等。确保网络配置正确,并保证各网络之间的通信。 4. 数据库安装:选择合适的数据库,如MySQL、MariaDB等,并按照官方文档的指引进行安装和配置。 5. 安装CloudStack管理服务器:下载CloudStack的安装包,并按照官方文档的指引进行安装和配置。在此过程中,需要指定数据库的连接信息、系统管理员账户等。 6. 安装CloudStack代理服务器:根据网络规划,安装云主机服务器、辅助存储服务器等。通过配置文件指定管理服务器的地址和端口,使代理服务器能够与管理服务器通信。 7. 启动CloudStack:启动各个组件,并检查日志文件,确保CloudStack能够正常运行。 8. 配置CloudStack:通过Web管理界面,进行CloudStack的配置和管理。包括添加物理主机、创建虚拟机、配置网络等操作。 9. 测试和监控:进行各项功能的测试,如虚拟机的创建和删除,网络的连通性等。同时,配置监控系统,以便及时发现和解决问题。 总而言之,CloudStack的安装和部署需要按照一系列步骤进行,包括硬件准备、操作系统安装、网络配置、数据库安装、安装管理服务器和代理服务器、启动和配置CloudStack等。通过这些步骤,可以搭建一个功能完善的云计算平台。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值