当前位置:网站首页>centos yum方式安装mysql
centos yum方式安装mysql
2022-07-27 14:42:00 【吃胡萝卜的鳄鱼】
1.下载 mysql源安装包
wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm

2.安装mysql源
yum localinstall mysql57-community-release-el7-8.noarch.rpm

3,检查mysql源是否安装成功
yum repolist enabled | grep "mysql.*-community.*"

4.安装Mysql
yum install mysql-community-server


5.启动mysql
systemctl start mysqld
6.设置开机启动
systemctl enable mysqld
systemctl daemon-reload
8.修改root本地登录密码
1)查看mysql初试密码
grep 'temporary password' /var/log/mysqld.log

2)连接mysql
mysql -uroot -p
输入第一步获取的那个密码
3)修改密码
ALTER USER 'root'@'localhost' IDENTIFIED BY 'Newpassword';
或者
set password for 'root'@'localhost'=password('Newpassword');
可能会出现下面的错误
Your password does not satisfy the current policy requirements
因为Mysql使用的默认的密码策略,如果需要设置简单的密码,点击下面链接:
https://blog.csdn.net/qq_37135484/article/details/98735515
边栏推荐
- scrapy爬虫框架
- [sword finger offer] interview question 45: arrange the array into the smallest number
- Content ambiguity occurs when using transform:translate()
- [sword finger offer] interview question 46: translating numbers into strings - dynamic programming
- Keil implements compilation with makefile
- Understand │ what is cross domain? How to solve cross domain problems?
- Reduce program ROM ram, GCC -ffunction sections -fdata sections -wl, – detailed explanation of GC sections parameters
- 解决openwrt package目录下多个文件夹重名编译警告(call subdir 函数)
- Three uses of static keyword
- Ncnn reasoning framework installation; Onnx to ncnn
猜你喜欢

Six capabilities of test and development

Voice live broadcast system -- a necessary means to improve the security of cloud storage

drf使用:get请求获取数据(小例子)

剑指 Offer 51. 数组中的逆序对

CAS比较交换的知识、ABA问题、锁升级的流程
![[sword finger offer] interview question 49: ugly number](/img/7a/2bc9306578530fbb5ac3b32254676d.png)
[sword finger offer] interview question 49: ugly number

C language: function stack frame

文本截取图片(哪吒之魔童降世壁纸)

网络原理(1)——基础原理概述

判断数据的精确类型
随机推荐
[sword finger offer] interview question 46: translating numbers into strings - dynamic programming
To meet risc-v challenges? ARM CPU introduces custom instruction function!
Network principle (2) -- network development
多线程带来的的风险——线程安全
Samsung closes its last mobile phone factory in China
SQL multi table query
C: What is the return value (revolution) in a function
[sword finger offer] interview question 56-i: the number of numbers in the array I
Division of entity classes (VO, do, dto)
Multiline text overflow dotting
Short video mall system, system prompt box, confirmation box, click blank to close the pop-up box
leetcode234题-简单方法判断回文链表
scrapy爬虫框架
Flask connects to existing tables in MySQL database
少见的按位操作符
Solve mt7620 continuous cycle uboot (LZMA error 1 - must reset board to recover)
逗号操作符你有用过吗?
一款功能强大的Web漏洞扫描和验证工具(Vulmap)
Text batch replacement function
Mlx90640 infrared thermal imager temperature sensor module development notes (VII)