centos7下yum安装mysql

xiaoxiao2021-02-28  69

centos7下yum安装mysql

时间:2014-09-19 01:02 来源:inuxpark  作者:inuxpark  举报  点击:102291次

CentOS 7的yum源中貌似没有正常安装mysql时的mysql-sever文件,需要去官网上下载

  # wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm # rpm -ivh mysql-community-release-el7-5.noarch.rpm # yum install mysql-community-server

成功安装之后重启mysql服务

  # service mysqld restart

初次安装mysql是root账户是没有密码的

设置密码的方法

  # mysql -uroot mysql> set password for ‘root’@‘localhost’ = password('mypasswd'); mysql> exit

搞定!

转自:http://www.centoscn.com/mysql/2014/0919/3778.html

转载请注明原文地址: https://www.6miu.com/read-82489.html

最新回复(0)