nginx安装mysql8.0

【安装步骤】

  • contos7默认安装了mariadb数据库,这里把他移除:yum remove mariadb-libs.x86_64
  • 创建文件目录 mkdir /etc/mysql
  • cd /etc/mysql
  • 下载
wget https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm 
4424012-2aca8553d041bd6a.png
下载
  • 下载添加到本地
yum localinstall mysql80-community-release-el7-1.noarch.rpm 
4424012-ff4fe6afe72762da.png
image.png
  • 安装
yum install mysql-community-server 
  • 启动
service mysqld start     service mysqld status
  • 进入mysql
    查找密码
    cat /var/log/mysqld.log | grep password
    4424012-5d881a9d47c143e2.png
    image.png

mysql -u root -p然后输入密码进入


修改密码(最好符号字母数字都有)

alter user 'root'@'localhost' identified by '!!Admin123';

然后刷新权限

flush privileges ;

转载于:https://www.jianshu.com/p/94f11628cc15

猜你喜欢

转载自blog.csdn.net/weixin_34114823/article/details/91330693
今日推荐