伺服器配置
Centos7.0+0.5G記憶體+1CPU
Web伺服器配置
PHP 5.4.16 + Nginx 1.6.3+MariaDB 5.5.44
在上面跑了一個shadowsocks和一個wordpress,資料庫設定檔使用my-small.cnf,但是MariaDB經常掛掉,所以求一個好的配置。
資料庫掛掉後,重啟MariaDb
啟動
systemctl start mariadb
結果
Job for mariadb.service failed. See 'systemctl status mariadb.service' and 'journalctl -xn' for details.
Run
systemctl status mariadb.service
mariadb.service - MariaDB database server Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled) Active: failed (Result: exit-code) since 三 2015-11-11 00:42:58 EST; 14s ago Process: 10969 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE) Process: 10968 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS) Process: 10941 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS) Main PID: 10968 (code=exited, status=0/SUCCESS)11月 11 00:42:57 jack mysqld_safe[10968]: 151111 00:42:57 mysqld_safe Logging to '/var/lib/mysql/jack.err'.11月 11 00:42:57 jack mysqld_safe[10968]: 151111 00:42:57 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql11月 11 00:42:57 jack mysqld_safe[10968]: 151111 00:42:57 mysqld_safe mysqld from pid file /var/lib/mysql/jack.pid ended11月 11 00:42:58 jack systemd[1]: mariadb.service: control process exited, code=exited status=111月 11 00:42:58 jack systemd[1]: Failed to start MariaDB database server.11月 11 00:42:58 jack systemd[1]: Unit mariadb.service entered failed state.
Run
journalctl -xn
-- Logs begin at 日 2015-11-08 06:23:57 EST, end at 三 2015-11-11 00:42:58 EST. --11月 11 00:27:21 jack sshd[10936]: Failed password for invalid user pi from 104.233.81.149 port 53083 ssh211月 11 00:27:21 jack sshd[10936]: Received disconnect from 104.233.81.149: 11: Bye Bye [preauth]11月 11 00:40:43 jack kernel: Ack 2451881106 before 2451884026:245189862611月 11 00:42:57 jack systemd[1]: Starting MariaDB database server...-- Subject: Unit mariadb.service has begun with start-up-- Defined-By: systemd-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel-- Unit mariadb.service has begun starting up.11月 11 00:42:57 jack mysqld_safe[10968]: 151111 00:42:57 mysqld_safe Logging to '/var/lib/mysql/jack.err'.11月 11 00:42:57 jack mysqld_safe[10968]: 151111 00:42:57 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql11月 11 00:42:57 jack mysqld_safe[10968]: 151111 00:42:57 mysqld_safe mysqld from pid file /var/lib/mysql/jack.pid ended11月 11 00:42:58 jack systemd[1]: mariadb.service: control process exited, code=exited status=111月 11 00:42:58 jack systemd[1]: Failed to start MariaDB database server.-- Subject: Unit mariadb.service has failed-- Defined-By: systemd-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel-- Unit mariadb.service has failed.-- The result is failed.11月 11 00:42:58 jack systemd[1]: Unit mariadb.service entered failed state.
回複內容:
伺服器配置
Centos7.0+0.5G記憶體+1CPU
Web伺服器配置
PHP 5.4.16 + Nginx 1.6.3+MariaDB 5.5.44
在上面跑了一個shadowsocks和一個wordpress,資料庫設定檔使用my-small.cnf,但是MariaDB經常掛掉,所以求一個好的配置。
資料庫掛掉後,重啟MariaDb
啟動
systemctl start mariadb
結果
Job for mariadb.service failed. See 'systemctl status mariadb.service' and 'journalctl -xn' for details.
Run
systemctl status mariadb.service
mariadb.service - MariaDB database server Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled) Active: failed (Result: exit-code) since 三 2015-11-11 00:42:58 EST; 14s ago Process: 10969 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE) Process: 10968 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS) Process: 10941 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS) Main PID: 10968 (code=exited, status=0/SUCCESS)11月 11 00:42:57 jack mysqld_safe[10968]: 151111 00:42:57 mysqld_safe Logging to '/var/lib/mysql/jack.err'.11月 11 00:42:57 jack mysqld_safe[10968]: 151111 00:42:57 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql11月 11 00:42:57 jack mysqld_safe[10968]: 151111 00:42:57 mysqld_safe mysqld from pid file /var/lib/mysql/jack.pid ended11月 11 00:42:58 jack systemd[1]: mariadb.service: control process exited, code=exited status=111月 11 00:42:58 jack systemd[1]: Failed to start MariaDB database server.11月 11 00:42:58 jack systemd[1]: Unit mariadb.service entered failed state.
Run
journalctl -xn
-- Logs begin at 日 2015-11-08 06:23:57 EST, end at 三 2015-11-11 00:42:58 EST. --11月 11 00:27:21 jack sshd[10936]: Failed password for invalid user pi from 104.233.81.149 port 53083 ssh211月 11 00:27:21 jack sshd[10936]: Received disconnect from 104.233.81.149: 11: Bye Bye [preauth]11月 11 00:40:43 jack kernel: Ack 2451881106 before 2451884026:245189862611月 11 00:42:57 jack systemd[1]: Starting MariaDB database server...-- Subject: Unit mariadb.service has begun with start-up-- Defined-By: systemd-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel-- Unit mariadb.service has begun starting up.11月 11 00:42:57 jack mysqld_safe[10968]: 151111 00:42:57 mysqld_safe Logging to '/var/lib/mysql/jack.err'.11月 11 00:42:57 jack mysqld_safe[10968]: 151111 00:42:57 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql11月 11 00:42:57 jack mysqld_safe[10968]: 151111 00:42:57 mysqld_safe mysqld from pid file /var/lib/mysql/jack.pid ended11月 11 00:42:58 jack systemd[1]: mariadb.service: control process exited, code=exited status=111月 11 00:42:58 jack systemd[1]: Failed to start MariaDB database server.-- Subject: Unit mariadb.service has failed-- Defined-By: systemd-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel-- Unit mariadb.service has failed.-- The result is failed.11月 11 00:42:58 jack systemd[1]: Unit mariadb.service entered failed state.