centos7环境下安装Mysql数据库的方法
时间:2016-01-02 22:30 来源:linux.it.net.cn 作者:IT
CentOS 7的yum源中没有正常安装Mysql-sever文件,需要去官网上下载:
1.下载支持Mysql-sever的rpm文件
# wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
2.安装rpm包
# rpm -ivh mysql-community-release-el7-5.noarch.rpm
3.安装mysql-sever
# yum install mysql-community-server
4.启动mysql
# service mysqld restart
初次安装mysql是root账户是没有密码的,设置密码的方法:
#mysql -uroot
mysql> set password for ‘root’@‘localhost’ = password('mypasswd');
mysql> exit!
(责任编辑:IT)
CentOS 7的yum源中没有正常安装Mysql-sever文件,需要去官网上下载: 1.下载支持Mysql-sever的rpm文件 # wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
2.安装rpm包 # rpm -ivh mysql-community-release-el7-5.noarch.rpm
3.安装mysql-sever # yum install mysql-community-server
4.启动mysql # service mysqld restart
|