色综合图-色综合图片-色综合图片二区150p-色综合图区-玖玖国产精品视频-玖玖香蕉视频

您的位置:首頁(yè)技術(shù)文章
文章詳情頁(yè)

centos7無法自啟動(dòng) mysql

瀏覽:92日期:2022-06-21 13:09:24

問題描述

阿里云ECS 安裝了mysql 5.6,使用 systemctl start mysql成功啟動(dòng)mysql,可使用 systemctl enable mysql將mysql加入到開機(jī)自啟動(dòng),可卻報(bào)錯(cuò):

[root@go ~]# mysql -Vmysql Ver 14.14 Distrib 5.6.29, for Linux (x86_64) using EditLine wrapper[root@go ~]#[root@go ~]# systemctl enable mysqlFailed to execute operation: No such file or directory[root@go ~]# systemctl enable mariadbFailed to execute operation: No such file or directory[root@go ~]#

使用systemctl enable mariadb 也是一樣的,我在Linode中的centos7是直接使用 systemctl enable mariadb 加入自啟動(dòng)的

但是運(yùn)行 systemctl enable httpd 是沒有報(bào)錯(cuò)。

[root@go ~]# chkconfigNote: This output shows SysV services only and does not include native systemd services. SysV configuration data might be overridden by native systemd configuration. If you want to list systemd services use ’systemctl list-unit-files’. To see services enabled on particular target use ’systemctl list-dependencies [target]’.aegis 0:off 1:off 2:on 3:on 4:on 5:on 6:offagentwatch 0:off 1:off 2:on 3:on 4:on 5:on 6:offnetconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:offnetwork 0:off 1:off 2:on 3:on 4:on 5:on 6:off[root@go ~]#

問題解答

回答1:

systemctl list-unit-files 查看下有沒有mysql.service 文件

回答2:

systemctl enable mysqld

回答3:

systemctl enable mysqld.service

回答4:

上面層主說的幾個(gè)命令都試了,還是沒有用:ystemctl enable mysqld.servicemysqld.service is not a native service, redirecting to /sbin/chkconfig.Executing /sbin/chkconfig mysqld on[root@iZj6c5y812icw80hzp696gZ ~]# systemctl enable mysqldmysqld.service is not a native service, redirecting to /sbin/chkconfig.Executing /sbin/chkconfig mysqld on[root@iZj6c5y812icw80hzp696gZ ~]# /sbin/chkconfig mysqld onhttp://aliyun.youhuima.cc

===========更新=============

找到了解決方法:編輯文件:vi /etc/rc.d/rc.local增加下面命令,保存/etc/rc.d/init.d/mysqld start

然后添加該文件可執(zhí)行權(quán)限:chmod +x /etc/rc.d/rc.local

經(jīng)過驗(yàn)證該方案可行。

相關(guān)文章:
主站蜘蛛池模板: 国产精选一区 | 免费观看一级一片 | 欧美一区二区亚洲 | 亚洲成人18| 黄色一及毛片 | 久久久久久久国产视频 | 手机在线观看黄色网址 | 性欧美高清久久久久久久 | 日韩无砖专区体验区 | 激情一区二区三区成人 | 久久久久久免费视频 | videosfree性欧美另类 | 女人夜色黄网在线观看 | 国产私拍福利精品视频推出 | 中文字幕无线精品乱码一区 | 步兵社区在线观看 | 欧美日韩一区二区三在线 | 欧美日韩一区二区三区免费 | 亚洲天堂精品在线观看 | 玖玖精品国产 | 色老久久| 国产精品情侣久久婷婷文字 | 亚洲人成人毛片无遮挡 | 午夜宅男宅女看在线观看 | 久久―日本道色综合久久 | 久久www免费人成_看片高清 | 亚洲成人毛片 | 韩国一级特黄毛片大 | 久久精品久久精品国产大片 | 99久久免费看精品国产一区 | 国产精品免费一区二区三区四区 | 日本三级香港三级少妇 | 欧美日一区 | 国产91丝袜在线播放九色 | 国产91页| 欧美特黄aaaaaaaa大片 | 国产微拍精品福利视频 | 99爱在线观看精品视频 | 俄罗斯小屁孩cao大人免费 | 中文字幕一级片 | 国产在线一区二区 |