56,677
社区成员
发帖
与我相关
我的任务
分享
[root@vm ~]# systemctl start mysql
Job for mysql.service failed. See 'systemctl status mysql.service' and 'journalctl -xn' for details.
[root@vm ~]# journalctl -xn
-- Logs begin at 四 2016-02-25 23:12:36 CST, end at 四 2016-02-25 15:25:08 CST. --
2月 25 15:24:49 vm.centos0 sshd[4380]: Accepted password for root from 192.168.162.56 port 22473 ssh2
2月 25 15:24:49 vm.centos0 systemd[1]: Starting Session 4 of user root.
-- Subject: Unit session-4.scope has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-4.scope has begun starting up.
2月 25 15:24:49 vm.centos0 systemd-logind[819]: New session 4 of user root.
-- Subject: A new session 4 has been created for user root
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
--
-- A new session with the ID 4 has been created for the user root.
--
-- The leading process of the session is 4380.
2月 25 15:24:49 vm.centos0 systemd[1]: Started Session 4 of user root.
-- Subject: Unit session-4.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-4.scope has finished starting up.
--
-- The start-up result is done.
2月 25 15:24:49 vm.centos0 sshd[4380]: pam_unix(sshd:session): session opened for user root by (uid=0)
2月 25 15:25:07 vm.centos0 systemd[1]: Starting LSB: start and stop MySQL...
-- Subject: Unit mysql.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has begun starting up.
2月 25 15:25:08 vm.centos0 mysql[4453]: Starting MySQL. ERROR! The server quit without updating PID file (/var/lib/mysql/vm.centos0.pid).
2月 25 15:25:08 vm.centos0 systemd[1]: mysql.service: control process exited, code=exited status=1
2月 25 15:25:08 vm.centos0 systemd[1]: Failed to start LSB: start and stop MySQL.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has failed.
--
-- The result is failed.
2月 25 15:25:08 vm.centos0 systemd[1]: Unit mysql.service entered failed state.
[root@vm ~]# systemctl status mysql
mysql.service - LSB: start and stop MySQL
Loaded: loaded (/etc/rc.d/init.d/mysql)
Active: failed (Result: exit-code) since 四 2016-02-25 15:25:08 CST; 15s ago
Process: 3834 ExecStop=/etc/rc.d/init.d/mysql stop (code=exited, status=0/SUCCESS)
Process: 4453 ExecStart=/etc/rc.d/init.d/mysql start (code=exited, status=1/FAILURE)
2月 25 15:25:07 vm.centos0 systemd[1]: Starting LSB: start and stop MySQL...
2月 25 15:25:08 vm.centos0 mysql[4453]: Starting MySQL. ERROR! The server quit without updating PID file (/var/lib/mysql/vm.centos0.pid).
2月 25 15:25:08 vm.centos0 systemd[1]: mysql.service: control process exited, code=exited status=1
2月 25 15:25:08 vm.centos0 systemd[1]: Failed to start LSB: start and stop MySQL.
2月 25 15:25:08 vm.centos0 systemd[1]: Unit mysql.service entered failed state.
[root@vm ~]#
chown -R mysql:mysql /var/lib/mysql/
chcon -R -t mysqld_db_t /var/lib/mysql/
拷贝应该是不能单库恢复的,把所有文件都拷回去,整体恢复了以后再删除不要的库。
mysql> use ismart
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+------------------+
| Tables_in_ismart |
+------------------+
| tbTel |
+------------------+
1 row in set (0.01 sec)
mysql> select * from tbTel;
ERROR 1146 (42S02): Table 'ismart.tbTel' doesn't exist
mysql> exit
Bye
[root@vm ismart]# systemctl stop mysql
[root@vm mysql]# systemctl start mysql
Job for mysql.service failed. See 'systemctl status mysql.service' and 'journalctl -xn' for details.
[root@vm mysql]# systemctl status mysql.service
mysql.service - LSB: start and stop MySQL
Loaded: loaded (/etc/rc.d/init.d/mysql)
Active: failed (Result: exit-code) since 二 2016-02-23 14:10:41 CST; 7s ago
Process: 3826 ExecStart=/etc/rc.d/init.d/mysql start (code=exited, status=1/FAILURE)
2月 23 14:10:40 vm.centos0 systemd[1]: Starting LSB: start and stop MySQL...
2月 23 14:10:41 vm.centos0 mysql[3826]: Starting MySQL. ERROR! The server quit without updating PID file (/var/lib/mysql/vm.centos0.pid).
2月 23 14:10:41 vm.centos0 systemd[1]: mysql.service: control process exited, code=exited status=1
2月 23 14:10:41 vm.centos0 systemd[1]: Failed to start LSB: start and stop MySQL.
2月 23 14:10:41 vm.centos0 systemd[1]: Unit mysql.service entered failed state.
[root@vm mysql]#
[root@vm mysql]# journalctl -xn
-- Logs begin at 二 2016-02-23 22:07:14 CST, end at 二 2016-02-23 14:10:41 CST. --
2月 23 14:10:37 vm.centos0 NetworkManager[955]: Listening on Socket/ens33
2月 23 14:10:37 vm.centos0 NetworkManager[955]: Sending on Socket/ens33
2月 23 14:10:37 vm.centos0 NetworkManager[955]: PRC: Soliciting for leases (INIT).
2月 23 14:10:37 vm.centos0 NetworkManager[955]: <info> dhclient started with pid 3823
2月 23 14:10:37 vm.centos0 NetworkManager[955]: <info> (ens33): canceled DHCP transaction, DHCP client pid 3821
2月 23 14:10:40 vm.centos0 systemd[1]: Starting LSB: start and stop MySQL...
-- Subject: Unit mysql.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has begun starting up.
2月 23 14:10:41 vm.centos0 mysql[3826]: Starting MySQL. ERROR! The server quit without updating PID file (/var/lib/mysql/vm.centos0.pid).
2月 23 14:10:41 vm.centos0 systemd[1]: mysql.service: control process exited, code=exited status=1
2月 23 14:10:41 vm.centos0 systemd[1]: Failed to start LSB: start and stop MySQL.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has failed.
--
-- The result is failed.
2月 23 14:10:41 vm.centos0 systemd[1]: Unit mysql.service entered failed state.
[root@vm mysql]#