centos 7怎么启动mysql

centos 7怎么启动mysql,第1张

1、设置开机自启动

chkconfig mysqld on

2、/etc/init.d/mysqld start

/etc/init.d/mysqld stop

3、centos6以前

services mysqld start

services mysqld stop

4、centos7需要用systemctl

systemctl start mysqld

systemctl stop mysqld

centos7自带是mariadb,一个mysql的变种。查看有没有安装过:yum list installed mysql*rpm -qa | grep mysql*安装mysql软件(mariadb)yum install mysql*启动mysqlsystemctl start mariadb.service 或者 systemctl start mysqld.service结束systemctl stop mariadb.service 或者 systemctl stop mysqld.service重启systemctl restart mariadb.service 或者 systemctl restart mysqld.service开机自启systemctl enable mariadb.service 或者 systemctl enable mysqld.service

centos7自带是mariadb,一个mysql的变种。

查看有没有安装过:

yum list installed mysql*

rpm -qa | grep mysql*

安装mysql软件(mariadb)

yum install mysql*

启动mysql

systemctl start mariadb.service 或者 systemctl start mysqld.service

结束

systemctl stop mariadb.service 或者 systemctl stop mysqld.service

重启

systemctl restart mariadb.service 或者 systemctl restart mysqld.service

开机自启

systemctl enable mariadb.service 或者 systemctl enable mysqld.service


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5918484.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-03-08
下一篇 2023-03-08

发表评论

登录后才能评论

评论列表(0条)

保存