亚洲精品久久久中文字幕-亚洲精品久久片久久-亚洲精品久久青草-亚洲精品久久婷婷爱久久婷婷-亚洲精品久久午夜香蕉

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

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

瀏覽:105日期: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)文章:
主站蜘蛛池模板: 久久精品草 | 91精品国产9l久久久久 | 亚洲国产精品va在线观看麻豆 | 在线观看扣喷水 | 国产在线拍偷自揄观看视频网站 | 尤物视频在线观看免费 | 欧美性生活视频播放 | 视频一区在线免费观看 | 欧美成人午夜免费完成 | 蜜桃视频成a人v在线 | 香蕉97超级碰碰碰免费公 | 久久午夜国产片 | qvod激情视频在线观看 | 欧美黄免在线播放 | 免费永久国产在线视频 | 草久久| 伊人蕉久影院 | 久久久91精品国产一区二区三区 | 久久中文字幕久久久久91 | 性插网站 | 欧美精品videossex性护士 | 成年人黄色片网站 | 欧美不卡一区二区三区 | 轻轻啪在线视频播放 | 国产精品久久久久久久成人午夜 | 亚洲国产成人影院播放 | 免费黄色大片在线观看 | 大香香蕉| 国产一级在线视频 | 成人18xxxx网站 | 久久er视频 | 成人在线观看视频网站 | 国产老妇人 | 一区二区三区四区在线观看视频 | 日韩不卡一区二区 | 免费观看黄视频 | 欧美顶级黄色大片免费 | 亚洲国产精品综合福利专区 | 国内国语一级毛片在线视频 | 国产欧洲亚洲 | 免费在线看h |