2016-10-31 30 views
4

問題の診断に問題があります(mysqlの起動に失敗しました)。どんな助けでも大歓迎です。MySqlの起動に失敗する

また、これは

ステップ1のUbuntu 16.04である - サービスMySQLが起動

Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. 

ステップ2 - systemctlステータスmysql.service

mysql.service - MySQL Community Server 
    Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) 
    Active: activating (start-post) (Result: exit-code) since Mon 2016-10-31 22:40:22 UTC; 11s ago 
    Process: 9780 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE) 
    Process: 9777 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS) 
Main PID: 9780 (code=exited, status=1/FAILURE);   : 9781 (mysql-systemd-s) 
    CGroup: /system.slice/mysql.service 
      └─control 
      ├─9781 /bin/bash /usr/share/mysql/mysql-systemd-start post 
      └─9806 sleep 1 

ステップ3 - journalctl -xe

Oct 31 22:42:32 sshd[10033]: Received disconnect from 121.18.238.109 port 34577:11: [preauth] 
Oct 31 22:42:32 sshd[10033]: Disconnected from 121.18.238.109 port 34577 [preauth] 
Oct 31 22:42:32 sshd[10033]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=121.18.238.109 user=root 
Oct 31 22:42:35 sshd[10090]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=116.31.116.23 user=root 
Oct 31 22:42:37 sshd[10090]: Failed password for root from 116.31.116.23 port 52791 ssh2 
Oct 31 22:42:39 sshd[10090]: Failed password for root from 116.31.116.23 port 52791 ssh2 
Oct 31 22:42:41 sshd[10090]: Failed password for root from 116.31.116.23 port 52791 ssh2 
Oct 31 22:42:41 sshd[10090]: Received disconnect from 116.31.116.23 port 52791:11: [preauth] 
Oct 31 22:42:41 sshd[10090]: Disconnected from 116.31.116.23 port 52791 [preauth] 
Oct 31 22:42:41 sshd[10090]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=116.31.116.23 user=root 
Oct 31 22:42:43 sshd[10084]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=121.18.238.109 user=root 
Oct 31 22:42:45 sshd[10084]: Failed password for root from 121.18.238.109 port 40812 ssh2 
Oct 31 22:42:48 sshd[10084]: Failed password for root from 121.18.238.109 port 40812 ssh2 
Oct 31 22:42:50 sshd[10084]: Failed password for root from 121.18.238.109 port 40812 ssh2 
Oct 31 22:42:50 sshd[10084]: Received disconnect from 121.18.238.109 port 40812:11: [preauth] 
Oct 31 22:42:50 sshd[10084]: Disconnected from 121.18.238.109 port 40812 [preauth] 
Oct 31 22:42:50 sshd[10084]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=121.18.238.109 user=root 
Oct 31 22:42:56 systemd[1]: Failed to start MySQL Community Server. 
-- 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. 
Oct 31 22:42:56 systemd[1]: mysql.service: Unit entered failed state. 
Oct 31 22:42:56 systemd[1]: mysql.service: Failed with result 'exit-code'. 
Oct 31 22:42:56 systemd[1]: mysql.service: Service hold-off time over, scheduling restart. 
Oct 31 22:42:56 systemd[1]: Stopped MySQL Community Server. 
-- Subject: Unit mysql.service has finished shutting down 
-- Defined-By: systemd 
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel 
-- 
-- Unit mysql.service has finished shutting down. 
Oct 31 22:42:56 systemd[1]: Starting MySQL Community Server... 
-- Subject: Unit mysql.service has begun start-up 
-- Defined-By: systemd 
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel 
-- 
-- Unit mysql.service has begun starting up. 
Oct 31 22:42:56 systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE 
Oct 31 22:43:04 sshd[10141]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=121.18.238.109 user=root 
Oct 31 22:43:06 sshd[10141]: Failed password for root from 121.18.238.109 port 56169 ssh2 
Oct 31 22:43:11 sshd[10141]: Failed password for root from 121.18.238.109 port 56169 ssh2 
Oct 31 22:43:13 sshd[10141]: Failed password for root from 121.18.238.109 port 56169 ssh2 
Oct 31 22:43:14 sshd[10178]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=116.31.116.23 user=root 
Oct 31 22:43:17 sshd[10178]: Failed password for root from 116.31.116.23 port 60094 ssh2 
Oct 31 22:43:18 sshd[10178]: Failed password for root from 116.31.116.23 port 60094 ssh2 
Oct 31 22:43:20 sshd[10178]: Failed password for root from 116.31.116.23 port 60094 ssh2 
Oct 31 22:43:20 sshd[10178]: Received disconnect from 116.31.116.23 port 60094:11: [preauth] 
Oct 31 22:43:20 sshd[10178]: Disconnected from 116.31.116.23 port 60094 [preauth] 
Oct 31 22:43:20 sshd[10178]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=116.31.116.23 user=root 
Oct 31 22:43:21 sshd[10141]: Received disconnect from 121.18.238.109 port 56169:11: [preauth] 
Oct 31 22:43:21 sshd[10141]: Disconnected from 121.18.238.109 port 56169 [preauth] 
Oct 31 22:43:21 sshd[10141]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=121.18.238.109 user=root 

多くの情報が役立ちます。私疲れmysqlERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

を受け、ここでエラーログは、mysqldのサービスを開始する

を開始mysqlのsudoのサービスを使用してみてください

2016-10-31T19:06:58.590888Z 0 [Note] Giving 0 client threads a chance to die gracefully 
2016-10-31T19:06:58.591364Z 0 [Note] Shutting down slave threads 
2016-10-31T19:06:58.592730Z 0 [Note] Forcefully disconnecting 0 remaining clients 
2016-10-31T19:06:58.592792Z 0 [Note] Event Scheduler: Purging the queue. 0 events 
2016-10-31T19:06:58.598944Z 0 [Note] Binlog end 
2016-10-31T19:06:58.701931Z 0 [Note] Shutting down plugin 'validate_password' 
2016-10-31T19:06:58.705709Z 0 [Note] Shutting down plugin 'ngram' 
2016-10-31T19:06:58.705751Z 0 [Note] Shutting down plugin 'ARCHIVE' 
2016-10-31T19:06:58.705790Z 0 [Note] Shutting down plugin 'partition' 
2016-10-31T19:06:58.705812Z 0 [Note] Shutting down plugin 'BLACKHOLE' 
2016-10-31T19:06:58.705844Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL' 
2016-10-31T19:06:58.706964Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES' 
2016-10-31T19:06:58.707001Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES' 
2016-10-31T19:06:58.707020Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS' 
2016-10-31T19:06:58.707037Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN' 
2016-10-31T19:06:58.707054Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS' 
2016-10-31T19:06:58.707208Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS' 
2016-10-31T19:06:58.707235Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES' 
2016-10-31T19:06:58.707255Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS' 
2016-10-31T19:06:58.707271Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES' 
2016-10-31T19:06:58.707286Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE' 
2016-10-31T19:06:58.707306Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE' 
2016-10-31T19:06:58.707322Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG' 
2016-10-31T19:06:58.707340Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED' 
2016-10-31T19:06:58.707358Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED' 
2016-10-31T19:06:58.707411Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD' 
2016-10-31T19:06:58.707432Z 0 [Note] Shutting down plugin 'INNODB_METRICS' 
2016-10-31T19:06:58.707449Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO' 
2016-10-31T19:06:58.707467Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS' 
2016-10-31T19:06:58.707484Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU' 
2016-10-31T19:06:58.707499Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE' 
2016-10-31T19:06:58.707516Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET' 
2016-10-31T19:06:58.707534Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX' 
2016-10-31T19:06:58.707566Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET' 
2016-10-31T19:06:58.707587Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM' 
2016-10-31T19:06:58.707603Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET' 
2016-10-31T19:06:58.707619Z 0 [Note] Shutting down plugin 'INNODB_CMP' 
2016-10-31T19:06:58.707636Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS' 
2016-10-31T19:06:58.707654Z 0 [Note] Shutting down plugin 'INNODB_LOCKS' 
2016-10-31T19:06:58.707672Z 0 [Note] Shutting down plugin 'INNODB_TRX' 
2016-10-31T19:06:58.707698Z 0 [Note] Shutting down plugin 'InnoDB' 
2016-10-31T19:06:58.711649Z 0 [Note] InnoDB: FTS optimize thread exiting. 
2016-10-31T19:06:58.714623Z 0 [Note] InnoDB: Starting shutdown... 
2016-10-31T19:06:58.819989Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation. 
2016-10-31T19:06:58.820088Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory. 
2016-10-31T19:06:58.820228Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool 
2016-10-31T19:06:58.820416Z 0 [ERROR] InnoDB: Cannot open '/var/lib/mysql/ib_buffer_pool.incomplete' for writing: Permission denied 
2016-10-31T19:07:00.692529Z 0 [Note] InnoDB: Shutdown completed; log sequence number 1333673446 
2016-10-31T19:07:00.693394Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation. 
2016-10-31T19:07:00.693505Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory. 
2016-10-31T19:07:00.693546Z 0 [Note] Shutting down plugin 'MEMORY' 
2016-10-31T19:07:00.693586Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA' 
2016-10-31T19:07:00.693933Z 0 [Note] Shutting down plugin 'MRG_MYISAM' 
2016-10-31T19:07:00.695547Z 0 [Note] Shutting down plugin 'MyISAM' 
2016-10-31T19:07:00.696705Z 0 [Note] Shutting down plugin 'CSV' 
2016-10-31T19:07:00.696747Z 0 [Note] Shutting down plugin 'sha256_password' 
2016-10-31T19:07:00.696758Z 0 [Note] Shutting down plugin 'mysql_native_password' 
2016-10-31T19:07:00.696766Z 0 [Note] Shutting down plugin 'keyring_file' 
2016-10-31T19:07:00.728590Z 0 [Note] Shutting down plugin 'binlog' 
2016-10-31T19:07:00.737815Z 0 [Note] /usr/sbin/mysqld: Shutdown complete 
+0

rootのパスワードが間違っていますか? –

+0

mysql -u root -pを試してみると、ソケット '/var/run/mysqld/mysqld.sock'(2)経由でローカルMySQLサーバーに接続できないので、私はエラー2002(HY000)を取得しないと思います。 – angdigi

+0

これはプログラミングに関するものではないので、これを話題にしていると言います。むしろ、ServerFaultまたはDBAに投稿されているはずです。 –

答えて

0

です。問題はアクセス権のようです - エラーは、mysqldにディレクトリへのアクセス権がないことを意味します。

+0

mm ..私はrootユーザーとしてコマンドを実行しています。いずれにせよ、sudoはインストールされていないので、私はそれをインストールしてそのコマンドを実行しましたが、エラーコードで制御プロセスが終了したため、mysql.serviceのジョブが失敗しました。詳細については、「systemctl status mysql.service」および「journalctl -xe」を参照してください。 – angdigi

0

私はこのファイルが削除されたため、私のケースではログファイルに問題がありました。私はこのファイル '/var/log/mysql/error.log'を作り直して解決しました。その後、私のサーバーは正常に起動しました。

関連する問題