centos7系统mysql的安装设置

京漂大叔 2020-01-07 PM 1899℃ 0条

centos 7 中把mysql改成了mariadb,所以安装mysql的命令如下
[root@nmserver-7 ~]# yum install mariadb mariadb-server mariadb-libs mariadb-devel
执行上面的命令,等待安装完毕之后
开启mysql服务,并设置开机启动,检查mysql状态
systemctl start mariadb //启动mysql
systemctl enable mariadb //并设置开机启动
systemctl status mariadb //检查mysql状态
mysql数据库密码设置和安全设置
输入命令 mysql_secure_installation 回车 进行设置选择‘y'或’n‘

httpd启动命令
(centos 7 请使用下面命令)

systemctl start httpd.service #启动apache
systemctl stop httpd.service #停止
systemctl restart httpd.service #重启

标签: mysql, httpd

非特殊说明,文章均为原创。

评论啦~