gpt4 book ai didi

MySql 启动失败

转载 作者:可可西里 更新时间:2023-11-01 06:52:05 24 4
gpt4 key购买 nike

无法诊断我的问题(mysql 无法启动)。任何帮助将不胜感激。

此外,这是在 Ubuntu 16.04 上

第 1 步 - 服务 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 status 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

可以提供帮助的更多信息。我厌倦了 mysql 但收到了 ERROR 2002 (HY000):无法通过套接字“/var/run/mysqld/mysqld.sock”连接到本地 MySQL 服务器 (2)

此外,这是错误日志

    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

最佳答案

尝试使用 sudo service mysql start

启动mysqld服务。问题似乎是访问权限 - 该错误意味着 mysqld 没有目录的访问权限。

关于MySql 启动失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40351720/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com