• ADADADADAD

    如何在centos7.4系统中使用yum源安装mysql 5.6[ mysql数据库 ]

    mysql数据库 时间:2024-11-29 09:50:12

    作者:文/会员上传

    简介:

    系统环境:centos7.4一,查看是否安装有数据库:yum list installed | grep mysqld/mariadb二,安装centos7系统带有mysql5.6安装包的yum源RPM资源包:rpm-Uvhhttp://dev.mysql.com/g

    以下为本文的正文内容,内容仅供参考!本站为公益性网站,复制本文以及下载DOC文档全部免费。

    系统环境:centos7.4

    一,查看是否安装有数据库:

    yum list installed | grep mysqld/mariadb

    二,安装centos7系统带有mysql5.6安装包的yum源RPM资源包:

    rpm-Uvhhttp://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpmyumcleanallyumrepolist

    三,安装msyql5.6:

    yum -y install mysql-community-server

    四,启动服务:

    systemctlstartmysqldsystemctlenablemysqld

    五,重置密码:是具体情况而定(可以省略,无密码登陆)

    #mysql_secure_installationSetrootpassword?[Y/n]y[设置root用户密码]Removeanonymoususers?[Y/n]y[删除匿名用户]Disallowrootloginremotely?[Y/n]n[禁止root远程登录]Removetestdatabaseandaccesstoit?[Y/n]y[删除test数据库]Reloadprivilegetablesnow?[Y/n]y[刷新权限]

    六,查看mysql版本:

    mysql-VmysqlVer14.14Distrib5.6.39,forLinux(x86_64)usingEditLinewrapper

    七,验证:(无密码)

    mysql -uroot -p 密码

    八、设置密码和远程权限

    数据库密码设置:#set password for 'root'@'localhost'=password('userpasswd');

    九、配置防火墙

    firewall-cmd --zone=public --add-port=3306/tcp --permanent

    如何在centos7.4系统中使用yum源安装mysql 5.6.docx

    将本文的Word文档下载到电脑

    推荐度:

    下载
    热门标签: centos7yummysql5.6