mysql不能启动:Unit mysql.service failed to load: No such file or directory的解决办法
Failed to issue method call: UnitMySQL.service failed to load: No such file or directory的解决办法作者:chszs,转载需注明。博客主页:http://blog.csdn.net/chszs1、软件环境:OpenSUSE 13.1 x64MySQL 5.6.20 x64
·
Failed to issue method call: Unit MySQL.service failed to load: No such file or directory的解决办法
作者:chszs,转载需注明。博客主页:http://blog.csdn.net/chszs
1、软件环境:
OpenSUSE 13.1 x64
MySQL 5.6.20 x64
2、采用RPM包安装MySQL 5.6.20
- # rpm -ivh MySQL-server-5.6.20-1.sles11.x86_64.rpm
- # rpm -ivh MySQL-client-5.6.20-1.sles11.x86_64.rpm
- # rpm -ivh MySQL-devel-5.6.20-1.sles11.x86_64.rpm
- # rpm -ivh MySQL-shared-5.6.20-1.sles11.x86_64.rpm
3、查看MySQL服务
- # /etc/init.d/mysql status
- MySQL is not running failed
- mysql.service
- Loaded: not-found (Reason: No such file or directory)
- Active: inactive (dead)
- Aug 22 15:42:26 173-168-58-139 systemd[1]: Stopped LSB: Start the MySQL database server.
可见,MySQL服务未启动。
4、启动MySQL服务
- # /etc/init.d/mysql start
- redirecting to systemctl start mysql
- Failed to issue method call: Unit mysql.service failed to load: No such file or directory.
报错,无法启动MySQL服务。
用systemctl方法
- # systemctl start mysql.service
Failed to issue method call: Unit mysql.service failed to load: No such file or directory. See system logs and 'systemctl status mysql.service' for details.
5、解决方法
- # systemctl enable mysql.service
- # systemctl start mysql
- # ps -ef | grep mysql
- root 27930 1 0 16:30 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/173-168-58-139.pid
- mysql 28045 27930 0 16:30 ? 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/173-168-58-139.err --pid-file=/var/lib/mysql/173-168-58-139.pid
- root 28074 25545 0 16:30 pts/1 00:00:00 grep --color=auto mysql
可见,MySQL已经正常运行。
「智能机器人开发者大赛」官方平台,致力于为开发者和参赛选手提供赛事技术指导、行业标准解读及团队实战案例解析;聚焦智能机器人开发全栈技术闭环,助力开发者攻克技术瓶颈,促进软硬件集成、场景应用及商业化落地的深度研讨。 加入智能机器人开发者社区iRobot Developer,与全球极客并肩突破技术边界,定义机器人开发的未来范式!
更多推荐
所有评论(0)