当前位置:网站首页>centos8 用yum 安装MySQL 8.0.x
centos8 用yum 安装MySQL 8.0.x
2022-07-06 18:17:00 【[email protected]】
目录
第二步:用yumyum makecache把服务器的包信息下载到本地电脑缓存起来
第一步:添加MySQL Yum存储库
yum -y install https://repo.mysql.com//mysql80-community-release-el7-3.noarch.rpm
第二步:用yumyum makecache把服务器的包信息下载到本地电脑缓存起来
yum makecache
第三步:安装mysql
sudo yum -y install mysql-community-server
安装成功!!!!
第四步,启动mysql,并设置为开机启动
先执行它,启动成功后执行下一步设置为开机启动
systemctl start mysqld
设置开机启动
systemctl enable mysqld
第五步,更改密码
先查看默认生成的密码,默认的密码就是输出的最后[email protected]:后面的全部
sudo grep 'temporary password' /var/log/mysqld.log
登录,然后密码就是上面的那个自动生成的
mysql -uroot -p
然后接下来就是更改密码,一步步来就是了
mysql>set global validate_password.policy=0;
mysql>set global validate_password.length=4;
mysql>ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password By 'newPassword'; # 修改密码
mysql>flush privileges;
mysql>update mysql.user set host = '%',plugin='mysql_native_password' where user = 'root'; # 全部主机都能访问
mysql>flush privileges;
mysql>exit;
#注意初始化的密码得必须符合长度,且必须含有数字,小写或大写字母,特殊字符。
如果下面两条报错了:ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
先运行下面那一条命令。
mysql>ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password By '[email protected]';
第六步,Linux登录和本地登录测试
版权声明
本文为[[email protected]]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_46504244/article/details/125589643
边栏推荐
- JS ES5也可以创建常量?
- 蓝桥杯2022年第十三届省赛真题-积木画
- AcWing 361. 观光奶牛 题解(spfa求正环)
- JVM 内存模型
- Ds-5/rvds4.0 variable initialization error
- Scenario practice: quickly build wordpress blog system based on function calculation
- 永久的摇篮
- js如何快速创建一个长度为 n 的数组
- Share a general compilation method of so dynamic library
- JS Es5 can also create constants?
猜你喜欢
修改px4飞控的系统时间
Can't you understand the code of linked list in C language? An article allows you to grasp the secondary pointer and deeply understand the various forms of parameter passing in the function parameter
CISP-PTE实操练习讲解(二)
454 Baidu Mianjing 1
Analyze "C language" [advanced] paid knowledge [II]
Box stretch and pull (left-right mode)
LeetCode. Sword finger offer 62 The last remaining number in the circle
Basic introduction and use of dvajs
sql中批量删除数据---实体中的集合
2022/0524/bookstrap
随机推荐
Add PDF Title floating window
Box stretch and pull (left-right mode)
AcWing 1142. 繁忙的都市 题解(最小生成树)
Telnet,SSH1,SSH2,Telnet/SSL,Rlogin,Serial,TAPI,RAW
AcWing 346. 走廊泼水节 题解(推公式、最小生成树)
Start from the bottom structure to learn the customization and testing of fpga---- FIFO IP
AcWing 1142. Busy urban problem solving (minimum spanning tree)
What does front-end processor mean? What is the main function? What is the difference with fortress machine?
Mongodb checks whether the table is imported successfully
454-百度面经1
一文带你走进【内存泄漏】
CISP-PTE之命令注入篇
WCF Foundation
对C语言数组的再认识
Related programming problems of string
修改px4飞控的系统时间
Appium自动化测试基础 — uiautomatorviewer定位工具
MySQL最基本的SELECT(查询)语句
C language instance_ five
The use of video in the wiper component causes full screen dislocation