解决MySQL启动报错:Warning:mysqld.service changed on disk问题
作者:还行少年
文章提示MySQL启动时报错,因服务配置文件已更改,需运行`systemctl daemon-reload`重新加载配置,随后重启MySQL服务以解决此问题
启动MySQL服务时报错
Warning: mysqld.service changed on disk. Run 'systemctl daemon-reload' to reload units.
警告
磁盘上的mysqld.service已更改。
运行“systemctl daemon-reload”重新加载单位。
解决方案
根据提示执行“systemctl daemon-reload”即可
[root@localhost mysql-5.6.26]# systemctl daemon-reload [root@localhost mysql-5.6.26]# systemctl status mysqld ● mysqld.service - LSB: start and stop MySQL Loaded: loaded (/etc/rc.d/init.d/mysqld; bad; vendor preset: disabled) Active: active (running) since 六 2021-06-19 15:37:07 CST; 7min ago Docs: man:systemd-sysv-generator(8) CGroup: /system.slice/mysqld.service ├─122601 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/home/mysql --pid-file=/home/mysql/localhost.loc... └─122716 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/home/mysql --plugin-dir=/usr/loca... 6月 19 15:37:06 localhost.localdomain systemd[1]: Starting LSB: start and stop MySQL... 6月 19 15:37:07 localhost.localdomain mysqld[122596]: Starting MySQL. SUCCESS! 6月 19 15:37:07 localhost.localdomain systemd[1]: Started LSB: start and stop MySQL. [root@localhost mysql-5.6.26]#
总结
以上为个人经验,希望能给大家一个参考,也希望大家多多支持脚本之家。
您可能感兴趣的文章:
- 解决mysql登录报错:mysql:[Warning] Using a password on the command line interface can be insecure.ERROR 10
- MySQL [Warning] TIMESTAMP with implicit DEFAULT value is deprecated(报错信息解决)
- MySQL无法重启报错Warning: World-writable config file ‘/etc/my.cnf’ is ignored的解决方法
- mysql启用skip-name-resolve模式时出现Warning的处理办法
- mysql启用skip-name-resolve模式时出现Warning的处理办法