centeros安装mysql
参考地址:http://www.linuxidc.com/Linux/2016-09/134940.htm
yum install mysql-server
若提示没有可用软件包,则需进行下列操作:
//下载mysql的repo源
[rooot@localhost ~ ] wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
//安装,将获得两个mysql的yum repo源:/etc/yum.repos.d/mysql-#community.repo,/etc/yum.repos.d/mysql-community-source.repo
[rooot@localhost ~ ] rpm -ivh mysql-community-release-el7-5.noarch.rpm
然后:
yum install mysql mysql-server mysql-libs mysql-server;
参考自:https://www.cnblogs.com/snake-hand/p/3157247.html
//检查是否安装
rpm -qa|grep -i mysql
//启动mysql服务
service mysql start
//以root身份打开数据库
mysql -u root