当前位置:网站首页>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
边栏推荐
- Gin 入门实战
- AcWing 1142. Busy urban problem solving (minimum spanning tree)
- ROS學習(23)action通信機制
- sql中批量删除数据---实体中的集合
- Telnet,SSH1,SSH2,Telnet/SSL,Rlogin,Serial,TAPI,RAW
- 爬虫实战(六):爬笔趣阁小说
- AcWing 345. Cattle station solution (nature and multiplication of Floyd)
- Baidu flying general BMN timing action positioning framework | data preparation and training guide (Part 2)
- AcWing 361. Sightseeing cow problem solution (SPFA seeking positive ring)
- AcWing 1148. 秘密的牛奶运输 题解(最小生成树)
猜你喜欢
Start from the bottom structure to learn the customization and testing of fpga---- FIFO IP
[unique] what is the [chain storage structure]?
蓝桥杯2022年第十三届省赛真题-积木画
设置Wordpress伪静态连接(无宝塔)
AcWing 361. Sightseeing cow problem solution (SPFA seeking positive ring)
AcWing 345. 牛站 题解(floyd的性质、倍增)
ROS学习(22)TF变换
2022/0524/bookstrap
开发中对集合里面的数据根据属性进行合并数量时犯的错误
How can I code for 8 hours without getting tired.
随机推荐
AcWing 904. 虫洞 题解(spfa求负环)
The cradle of eternity
Yunna | work order management software, work order management software app
BigDecimal 的正确使用方式
Public key \ private SSH avoid password login
Yunna - work order management system and process, work order management specification
Blue Bridge Cup 2022 13th provincial competition real topic - block painting
Comparison of picture beds of free white whoring
Shell script quickly counts the number of lines of project code
永久的摇篮
mysqlbackup 还原特定的表
MySQL最基本的SELECT(查询)语句
Analyze "C language" [advanced] paid knowledge [End]
设置Wordpress伪静态连接(无宝塔)
JVM memory model
各种语言,软件,系统的国内镜像,收藏这一个仓库就够了: Thanks-Mirror
Amway wave C2 tools
JS reverse -- ob confusion and accelerated music that poked the [hornet's nest]
C language instance_ five
According to the analysis of the Internet industry in 2022, how to choose a suitable position?