centos7不能安装mysql数据库_centos7 安装mysql数据库 及常见问题解决办法

本文详细介绍了在CentOS7上安装MySQL数据库的步骤,包括配置YUM源、安装MySQL、启动服务、设置开机启动、修改root密码、添加远程登录用户,并解决了密码策略和权限等常见问题。
摘要由CSDN通过智能技术生成

一、配置YUM源html

下载mysql源安装包

shell> wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpmmysql

安装mysql源

shell> yum localinstall mysql57-community-release-el7-8.noarch.rpm

检查MySQL源是否安装成功

shell> yum repolist enabled | grep “mysql.-community.” sql

二、安装MySQL

shell> yum install mysql-community-server

三、启动MySQL服务

shell> systemctl start mysqld

查看MySQL的启动状态

shell> systemctl status mysqldshell

4e4083eded630a524ab0979d32244a74.png

四、开机启动

shell> systemctl enable mysqld

shell> systemctl daemon-reload数据库

五、修改root本地登陆密码

grep ‘temporary password’ /var/log/mysqld.log

mysql -uroot –p+生产注意:mysql5.7默认安装了密码安全检查插件(validate_password),默认密码检

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值