先查看历史版本 rpm -qa | grep -i mysql 有则卸载 rpm -e (此处填写MySQL版本信息) --nodeps
用SCRT上传 alt+p
进入/usr/local 创建 mysql文件夹 mkdir mysql
回到根目录剪切到创建的文件夹中 mv mysql-8.0.25-1.el6.x86_64.rpm-bundle.tar /usr/local/mysql
解压 tar -xvf mysql-8.0.25-1.el6.x86_64.rpm-bundle.tar
安装第三方依赖库 yum -y install libaio.so.1 libgcc_s.so.1 libstdc++.so.6 libncurses.so.5 --setopt=protected_multilib=false  
 complete 完成~ 在线安装,需要网络
依次执行 rpm -ivh mysql-community-client-8.0.25-1.el6.x86_64.rpm --force --nodeps rpm -ivh mysql-community-libs-8.0.25-1.el6.x86_64.rpm --nodeps --force rpm -ivh mysql-community-client-8.0.25-1.el6.x86_64.rpm --nodeps --force rpm -ivh mysql-community-server-8.0.25-1.el6.x86_64.rpm --nodeps --force  初始化和相关配置,依次执行下列命令 mysqld --initialize 执行报错  执行 yum install -y libaio 完成 启动服务 systemctl start mysqld.service 进入日志查看初始密码 tail -f /var/log/mysqld.log   登录 修改密码 重新登录 退出
修改远程连接权限 update user set host = ‘%’ where user = ‘root’;
刷新权限,重新用navicat连接,连接成功 flush privileges;
|