一.安装mysql

这里我们基础系统是centos7.5

[root@monitor ~]# yum install -y mariadb-server
[root@monitor ~]# systemctl start mariadb && systemctl enable mariadb
[root@monitor ~]# 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): 【输入数据库超级管理员root密码,注意不是系统root的密码,第一次进入还没有设置直接回车】
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: 【再次输入密码】
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 【移除匿名用户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] n 【拒绝root远程登录n】
... skipping. 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 【删除test数据库,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 【重新加载权限表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@monitor ~]# mysql -uroot -ptest_123
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 5.5.65-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)]>

centos7.5安装mariadb的更多相关文章

  1. MariaDB Centos7 下安装MariaDB

    Centos7 下安装MariaDB by:授客 QQ:1033553122 1.下载安装文件 rpm包为例,对于标准服务器安装,至少需要下载client,shared,serve文件(安装时如果少了 ...

  2. CentOS7 编译安装 Mariadb (实测 笔记 Centos 7.0 + Mariadb 10.0.15)

    环境: 系统硬件:vmware vsphere (CPU:2*4核,内存2G,双网卡) 系统版本:CentOS-7.0-1406-x86_64-DVD.iso 安装步骤: 1.准备 1.1 显示系统版 ...

  3. CentOS7下安装MariaDB

    环境:Window10 上建立 VMWare 虚拟机,EasyInstaller 方式安装 CentOS 7 1. “失败”的经历 备份原 repo 文件,并更改 yum 源(方法详见修改yum源)为 ...

  4. Centos7上安装mariadb

    一.查看系统是否安装了mariadb,有的话就删除掉. 1.rpm -qa | grep mariadb 2.rpm -e --nodeps mariadb-libs-5.5.56-2.el7.x86 ...

  5. CentOS7编译安装MariaDB

    一.环境信息: 操作系统版本:CentOS Linux release 7.3.1611 (Core) 内核版本:3.10.0-514.el7.x86_64 MariaDB版本:mariadb-10. ...

  6. CentOS7下安装Mariadb 10.3.17

    1. install lsb packagesudo yum install -y redhat-lsb 2.install net-tools packagesudo yum install -y ...

  7. CentOS7 yum安装Mariadb

    1.安装Mariadb #yum -y install mariadb mariadb-server 1.1当执行程序末端显示Complete则完成安装 2.安装完成后启动服务 # systemctl ...

  8. CentOS7.3yum安装MariaDB报错[Errno 256]

    在yum安装MariaDB时出现下面这个错误提示,然后着手排查,先检查了/etc/yum.repo.d/下的配置文件,没有错误. failure: repodata/repomd.xml from m ...

  9. CentOS7中安装MariaDB

    什么是mariaDB? 在线安装(慢的要命) RPM离线安装(CentOS7.X) 在线安装 打开官方网站 https://mariadb.org/ 点击Download,跳转到下一页面 继续点击Do ...

  10. Centos7.2安装MariaDB数据库,并进行基础配置

    [注] MariaDB的安装与配置感谢博主carlo-jie的分享,原博文地址https://www.cnblogs.com/carlo-jie/p/6104135.html. 第二小节:用户创建及权 ...

随机推荐

  1. Golang Linux、Windows、Mac 下交叉编译

    前言 Golang 支持交叉编译, 即同一份代码,在一个平台上生成,然后可以在另外一个平台去执行. 之前写过一篇 Golang windows下 交叉编译 感觉写的不够全面,这篇作为补充. 交叉编译 ...

  2. php使用redis锁

    redis加锁分类 redis能用的的加锁命令分别是INCR.SETNX.SET 利用predis操作redis方法大全 第一种锁命令INCR 这种加锁的思路是, 当 key 不存在,那么 key 的 ...

  3. 尝试使用 Python 截屏并录屏

    ( 本文的完整版地址在 https://www.ccgxk.com/?post=494 ) 我在去年,曾经尝试过一个大胆的东西,就是使用 Python 写了个程序来录屏,以此给自己一种"期待 ...

  4. ASP.NET Core 阿弥陀佛中间件

    Amitabha n. <梵>(佛)阿弥陀佛 佛曰: 因果 那么一天 看见文章1. 发现还有2.这么个中间件 于是追寻源码,发现了3. 再然后寻思自己也可以写一个什么中间件,以便学习掌握 ...

  5. FastAPI中实现动态条件必填字段的实践

    title: FastAPI中实现动态条件必填字段的实践 date: 2025/04/03 00:06:20 updated: 2025/04/03 00:06:20 author: cmdragon ...

  6. TCP延迟调优之PSH参数与passt延迟问题修复

    qemu中使用passt来作为虚拟机的网卡NAT实现,希望能够利用它IP地址与host一致的优点.这本来是没有啥问题的,但是不知道为什么它的TCP入口流量的延迟很严重. 好吧,反正以后总是要改pass ...

  7. 如何在 Vim 里直接完成 Git 操作?

    Vim 是 Linux 下一款很常用的文本编辑器,虽然它对初学者而言并不友好,但通过一些插件的配合,它可以被打造成一款很强大的 IDE .良许曾经介绍过三款很常用的插件,可点击以下链接查看: Vim ...

  8. 🎀dubbo QOS介绍及命令

    简介 在Dubbo中,QoS(Quality of Service)功能是一个非常重要的特性,用于提供对运行时服务的查询和控制能力. QoS的概念源自网络设备中的服务质量保障机制,但在Dubbo中,它 ...

  9. 能用 Java8 开发 MCP(或 MCP Server),这才是 MCP 自由(Solon AI MCP)!

    现在,用 Java 开发 MCP 的情况是: 框架 JDK要求 mcp-sdk 需要 jdk17+ spring-ai-mcp-server 需要 jdk17 + spring-ai-mcp-clie ...

  10. 关于composer报错The openssl extension is required for SSL/TLS protection but is not available问题

    今天使用composer的时候得到了这个错误: The openssl extension is required for SSL/TLS protection but is not availabl ...