Mysql 8.0 学习笔记(从安装配置到知识学习)

前言

本篇文章基于腾讯云CentOS 7.5环境。记录了Mysql 8.0从安装配置到知识点学习。
文末附资源链接。

一、Mysql数据库 安装及配置

1.Mysql简介

MySQL是一种开放源代码的关系型数据库管理系统(RDBMS),使用最常用的数据库管理语言–结构化查询语言(SQL)进行数据库管理。

MySQL是开放源代码的,因此任何人都可以在General Public License的许可下下载并根据个性化的需要对其进行修改。

MySQL因为其速度、可靠性和适应性而备受关注。大多数人都认为在不需要事务化处理的情况下,MySQL是管理内容最好的选择。

2.Mysql安装
2.1 下载并添加存储库
yum localinstall https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm

在这里插入图片描述

2.2 安装MySQL 8.0包

与其他使用yum的软件包一样安装MySQL:

yum install mysql-community-server

安装过程中,会询问是否导入MySQL GPG密钥,输入y即可。
在这里插入图片描述
安装完成。

3.启动MySQL
3.1 启动MySQL服务并设置自启动
systemctl enable mysqld    #设置开机启动
systemctl start mysqld	   #启动Mysql
3.1 检查MySQL服务状态
systemctl status mysqld

在这里插入图片描述
Active: active (running)。运行中。

4. Mysql 安全

当第一次启动MySQL服务器时,为MySQL根用户生成一个临时密码。 您可以通过运行以下命令找到密码:

grep 'temporary password' /var/log/mysqld.log

在这里插入图片描述
首先记下生成的临时密码,
运行mysql_secure_installation命令来提高MySQL安装的安全性:

mysql_secure_installation

输入临时密码后,系统会要求您为root用户设置新密码。密码必须至少包含8个字符并且至少包含一个大写字母,一个小写字母,一个数字和一个特殊字符。
在这里插入图片描述
该脚本还会要求您删除匿名用户,限制root用户对本地计算机的访问权限并删除测试数据库。 你应该对所有问题回答“y”

5.从命令行连接到MySQL

以root用户类型登录到MySQL服务器

mysql -u root -p

系统将提示您输入在运行mysql_secure_installation脚本时以前设置的root密码

一旦你输入密码&#

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
MySQL 8 Cookbook: Over 150 recipes for high-performance database querying and administration Design and administer enterprise-grade MySQL 8 solutions MySQL is one of the most popular and widely used relational databases in the World today. The recently released MySQL 8 version promises to be better and more efficient than ever before. This book contains everything you need to know to be the go-to person in your organization when it comes to MySQL. Starting with a quick installation and configuration of your MySQL instance, the b ook quickly jumps into the querying aspects of MySQL. It shows you the newest improvements in MySQL 8 and gives you hands-on experience in managing high-transaction and real-time datasets. If you’ve already worked with MySQL before and are looking to migrate your application to MySQL 8, this book will also show you how to do that. The book also contains recipes on efficient MySQL administration, with tips on effective user management, data recovery, security, database monitoring, performance tuning, troubleshooting, and more. With quick solutions to common and not-so-common problems you might encounter while working with MySQL 8, the book contains practical tips and tricks to give you the edge over others in designing, developing, and administering your database effectively. What You Will Learn Install and configure your MySQL 8 instance without any hassle Get to grips with new features of MySQL 8 like CTE, Window functions and many more Perform backup tasks, recover data and set up various replication topologies for your database Maximize performance by using new features of MySQL 8 like descending indexes, controlling query optimizer and resource groups Learn how to use general table space to suit the SaaS or multi-tenant applications Analyze slow queries using performance schema, sys schema and third party tools Manage and monitor your MySQL instance and implement efficient

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值