饿虎岗资源网 Design By www.oxmxm.com

系统环境:centos7.4

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

yum list installed | grep mysqld/mariadb

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

rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

yum clean all

yum repolist

三,安装msyql5.6:

yum -y install mysql-community-server

四,启动服务:

systemctl start mysqld

systemctl enable mysqld

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

#mysql_secure_installation

Set root password"htmlcode">
mysql -V

mysql Ver 14.14 Distrib 5.6.39, for Linux (x86_64) using EditLine wrapper

七,验证:(无密码)

mysql -uroot -p 密码

八、设置密码和远程权限

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

九、配置防火墙

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

饿虎岗资源网 Design By www.oxmxm.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
饿虎岗资源网 Design By www.oxmxm.com