码迷,mamicode.com
首页 > 数据库 > 详细

RPM安装MySQL 8.0

时间:2018-05-01 23:53:08      阅读:561      评论:0      收藏:0      [点我收藏+]

标签:MySQL

卸载centos自带的mariadb rpm -qa mariadb* rpm -e *** --nodeps 下载mysql 8.0的rpm完整包 wget -O /tmp/mysql-8.0.11-1.el7.x86_64.rpm-bundle.tar https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.11-1.el7.x86_64.rpm-bundle.tar 解压出rpm包 cd /tmp/ tar xvf mysql-8.0.11-1.el7.x86_64.rpm-bundle.tar yum安装一下net-tools库、perl yum -y install net-tools* yum -y install perl 新建用户和用户组 groupadd mysql useradd -g mysql mysql 依次编译安装 rpm -ivh mysql-community-common-8.0.11-1.el7.x86_64.rpm rpm -ivh mysql-community-libs-8.0.11-1.el7.x86_64.rpm rpm -ivh mysql-community-client-8.0.11-1.el7.x86_64.rpm rpm -ivh mysql-community-server-8.0.11-1.el7.x86_64.rpm 初始化mysql mysqld --initialize --user=mysql 启动mysql systemctl start mysqld 查看生成的密码 vim /var/log/mysqld.log #k7jIhWyXDbj 登陆mysql mysql -u root -p 修改密码: ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘123456‘; flush privileges; 至此MySQL 8.0 安装完成

RPM安装MySQL 8.0

标签:MySQL

原文地址:http://blog.51cto.com/gdutcxh/2110227

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!