一.安装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. PostgreSQL psql 常用快捷命令

    psql 常用快捷命令 \l 显示所有数据库 \c 切换当前数据库,相当于 mysql 的 use 命令 \d 显示数据库中有哪些表 \d tb_name 显示表 tb_name 的定义 \d+ 显示 ...

  2. PostgreSQL的可变字符串

    在Oralce中,通常都使用varchar2作为字符串,它能自动删除前后空格.因业务需要用到Postgre,使用了character类型,用起来是没有什么问题.后来发现在smartBI引用这里面的数据 ...

  3. 一文速通Python并行计算:01 Python多线程编程-基本概念、切换流程、GIL锁机制和生产者与消费者模型

    一文速通 Python 并行计算:01 Python 多线程编程-基本概念.切换流程.GIL 锁机制和生产者与消费者模型 摘要: 多线程允许程序同时执行多个任务,提升效率和响应性.线程分为新建.就绪. ...

  4. 网页P图

    此篇文章记录一段比较好玩的网页P图代码 1.在你要修改的网页上Fn + F12或者F12打开控制台,然后在console里输入这样一段代码,回车 document.designMode = 'on' ...

  5. 1001: 【编程入门】A+B 输入输出练习I

    1001: [编程入门]A+B 输入输出练习I[https://www.cyccfoj.com/problem.php?id=1001] ''' 题目描述 你的任务是计算a+b.这是为了acm初学者专 ...

  6. S7.Net与西门子PLC通讯——纯新手必看

     前言 本文档适合从未接触过PLC的.NET开发程序员入门查看.(其实看完了之后,PLC开发也就那样) PLC通讯入门比较难,需要关注的细节比较多.一边学习一边举一反三多思考,一定要自己创建Demo跟 ...

  7. DevSecOps的实现与相关开源工具

    DevSecOps的实现与相关开源工具 DevSecOps是一种以自动化方式在DevOps流程中集成安全工具的方法.DevSecOps不仅仅是引入新的安全工具,还包括关于使用这些工具的必要知识.这需要 ...

  8. 基于Lighthouse搭建高颜值的YesPlayMusic网易云播放器

    本文介绍了如何使用腾讯云的Lighthouse轻量应用服务器来搭建一个高颜值的第三方网易云播放器. 项目简介 本文使用的是YesPlayMusic项目,这是一款高颜值的第三方网易云播放器,它完全可以作 ...

  9. java程序乱码问题

    1.字符编码简介 字符编码从字面上理解,就是将字符编码为由多个bits(0或1)组成的字节序列.但字符和字节序列的映射并不是直接的,可简要概括为2个步骤,第1步由字符映射到unicode码,第2步由u ...

  10. Linux防火墙操作指令

    firewall-cmd --list-ports # 查看开放的端口号 firewall-cmd --zone=public --add-port=8888/tcp --permanent # 开放 ...