在CentOS7中安装MySQL8.3.0

MySQL Community Server 官网:https://dev.mysql.com/downloads/mysql

基础架构及系统版本:x86_64,CentOS Linux release 7.9.2009 (Core)
[root@localhost sql-bench]# uname -r
3.10.0-1160.114.2.el7.x86_64
[root@localhost sql-bench]# cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)

yum包路径:/var/cache/yum/x86_64/7/base/packages
mariadb的库:mariadb-libs
rpm -ivh:install verbose(冗长) hash(哈希) ——可视化。
查看mysql服务状态及本次开启:systemctl status mysqldsystemctl start mysqld
刷新密码:FLUSH PRIVILEGES

privileges 刷新特权,改变俱乐部的钥匙的分配

1.清除本机mysql和mariadb
2.下载RPM Bundle并解压
我的路径:/home/centos7/Downloads
3.顺序安装:
mysql-community-common-8.3.0-1.el7.x86_64.rpm
mysql-community-client-plugins-8.3.0-1.el7.x86_64.rpm
mysql-community-libs-8.3.0-1.el7.x86_64.rpm
mysql-community-client-8.3.0-1.el7.x86_64.rpm
mysql-community-icu-data-files-8.3.0-1.el7.x86_64.rpm
mysql-community-server-8.3.0-1.el7.x86_64.rpm
4.启动mysql服务
6.登录mysql,mysql -u root -p
5.查看密码,cat /var/log/mysqld.log | grep password
7.修改密码,ALTER USER 'root'@'localhost' IDENTIFIED mysql_native_password BY 'Root?2?'

工欲善其事,必先利其器。因为后续学习需要安装测试工具所以后来重新安装了全部rpm

posted @ 2024-03-17 16:30  基础狗  阅读(389)  评论(0编辑  收藏  举报