centos8安装MySQL8.0(上)
作者:互联网
准备工作
yum check update
前提插件
yum install gcc -y
yum install -y gcc-c++
下载
1.前提
在usr/local建立mysql文件夹
mkdir -p /usr/lcoal/mysql
2.下载MySQL
2.1
wget下载
wget https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.27-1.el8.x86_64.rpm-bundle.tar
2.2官网下载然后通过xftp7上传到usr/local/mysql目录下
Mysql8.0.27https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.27-1.el8.x86_64.rpm-bundle.tar3.解压并删除压缩包
//解压
tar -xvf mysql-8.0.27-1.el8.x86_64.rpm-bundle.tar
//删除
rm -f mysql-8.0.27-1.el8.x86_64
解压后
mysql-community-client-8.0.27-1.el8.x86_64.rpm
mysql-community-client-debuginfo-8.0.27-1.el8.x86_64.rpm
mysql-community-client-plugins-8.0.27-1.el8.x86_64.rpm
mysql-community-client-plugins-debuginfo-8.0.27-1.el8.x86_64.rpm
mysql-community-common-8.0.27-1.el8.x86_64.rpm
mysql-community-debuginfo-8.0.27-1.el8.x86_64.rpm
mysql-community-debugsource-8.0.27-1.el8.x86_64.rpm
mysql-community-devel-8.0.27-1.el8.x86_64.rpm
mysql-community-libs-8.0.27-1.el8.x86_64.rpm
mysql-community-libs-debuginfo-8.0.27-1.el8.x86_64.rpm
mysql-community-server-8.0.27-1.el8.x86_64.rpm
mysql-community-server-debug-8.0.27-1.el8.x86_64.rpm
mysql-community-server-debug-debuginfo-8.0.27-1.el8.x86_64.rpm
mysql-community-server-debuginfo-8.0.27-1.el8.x86_64.rpm
mysql-community-test-8.0.27-1.el8.x86_64.rpm
mysql-community-test-debuginfo-8.0.27-1.el8.x86_64.rpm
3.1安装
注:要安装make命令(如果没有)
安装make工具
make工具依赖gcc ,automake,autoconf,libtool,make
gcc上面已经安装
yum install automake autoconf libtool make
安装vim命令(如果没有)
yum -y install vim*
然后就是安装以下四个rmp
rpm -ivh mysql-community-common-8.0.27-1.el8.x86_64.rpm --nodeps --force
rpm -ivh mysql-community-libs-8.0.27-1.el8.x86_64.rpm --nodeps --force
rpm -ivh mysql-community-client-8.0.27-1.el8.x86_64.rpm --nodeps --force
rpm -ivh mysql-community-server-8.0.27-1.el8.x86_64.rpm --nodeps --force
查看安装的软件
[root@localhost mysql]# rpm -qa | grep mysql
mysql-community-client-8.0.27-1.el8.x86_64
mysql-community-common-8.0.27-1.el8.x86_64
mysql-community-libs-8.0.27-1.el8.x86_64
mysql-community-server-8.0.27-1.el8.x86_64
设置完善
//创建了date文件
[root@localhost mysql]# mysqld --initialize;
[root@localhost mysql]# chown mysql:mysql /var/lib/mysql -R;
//启动服务
[root@localhost mysql]# systemctl start mysqld.service;
//通过systemctl管理mysqld服务
[root@localhost mysql]# systemctl enable mysqld;
标签:8.0,27,rpm,el8,MySQL8.0,mysql,64,安装,centos8 来源: https://blog.csdn.net/rj2012001/article/details/121783071