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

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

centos7無法自啟動 mysql

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

問題描述

阿里云ECS 安裝了mysql 5.6,使用 systemctl start mysql成功啟動mysql,可使用 systemctl enable mysql將mysql加入到開機(jī)自啟動,可卻報(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 加入自啟動的

但是運(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)文章:
主站蜘蛛池模板: 欧日韩视频777888 | 97国内免费久久久久久久久久 | 麻豆国产一区二区在线观看 | 久久精品国产免费观看99 | 国产图片亚洲精品一区 | 成人免费福利片在线观看 | 欧洲精品码一区二区三区免费看 | 亚洲国产精品高清在线一区 | 国产a精品 | 性欧美成人免费观看视 | 日本中文不卡 | 国产一级一级毛片 | 成人黄色免费网址 | 国产日韩欧美在线视频免费观看 | 国内精品在线视频 | 成 人 黄 色 全 集 | 国产精品久久二区三区色裕 | 黄色免费在线观看 | 久久婷婷在线 | 亚洲精品久久精品h成人 | 日韩午夜高清福利片在线观看 | 成人亚洲精品一区二区 | 成人性视频在线三级 | 看一级黄色毛片 | 国产国产人在线成免费视频69 | 国产在线观看精品 | 免费a在线看| 99精品欧美一区 | a级毛片免费全部播放 | 国产福利专区精品视频 | 在线欧美国产 | 亚洲婷婷综合中文字幕第一页 | 西西午夜视频 | 极品精品国产超清自在线观看 | 午夜刺激视频 | 国产成人高清在线观看播放 | 五夜婷婷 | 麻豆成人在线观看 | 黄色成年网站 | 国产区精品福利在线观看精品 | 精品推荐国产麻豆剧传媒 |