AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 844719
Accepted
Waqas Tariq
Waqas Tariq
Asked: 2017-04-17 01:01:43 +0800 CST2017-04-17 01:01:43 +0800 CST 2017-04-17 01:01:43 +0800 CST

MySQL 服务器升级到 5.6 后间歇性崩溃

  • 772

我有一个新实例(lightsail 2GB/AMI),我正在使用单个 wordpress 站点进行测试。我在上面安装了 mysql (sudo yum install mysql-server) 并将一个已经存在的数据库导入其中,它在导入时给了我一堆错误......长话短说,我决定卸载并安装亚马逊帮助上推荐的版本( sudo yum install -y mysql56-server)。这次正确导入了db。

我进入 wordpress 并启用了 W3 Total Cache 插件。自从我这样做后,MySQL 就间歇性地崩溃了。

mysqld -v 给了我这个(下面的错误日志);

[ec2-user@ip- lib]$ mysqld -v
2017-04-16 07:28:39 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-04-16 07:28:39 0 [Warning] Can't create test file /var/lib/mysql/ip-172-xx3.lower-test
2017-04-16 07:28:39 0 [Note] mysqld (mysqld 5.6.35) starting as process 16301 ...
2017-04-16 07:28:39 16301 [Warning] Can't create test file /var/lib/mysql/ip-172xx3.lower-test
2017-04-16 07:28:39 16301 [Warning] Can't create test file /var/lib/mysql/ip-172-2xx3.lower-test
2017-04-16 07:28:39 16301 [Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 5000)

2017-04-16 07:28:39 16301 [Warning] Buffered warning: Changed limits: table_open_cache: 431 (requested 2000)

2017-04-16 07:28:39 16301 [Note] Plugin 'FEDERATED' is disabled.
mysqld: Can't find file: './mysql/plugin.frm' (errno: 13 - Permission denied)
2017-04-16 07:28:39 16301 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2017-04-16 07:28:39 16301 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-04-16 07:28:39 16301 [Note] InnoDB: The InnoDB memory heap is disabled
2017-04-16 07:28:39 16301 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-04-16 07:28:39 16301 [Note] InnoDB: Memory barrier is not used
2017-04-16 07:28:39 16301 [Note] InnoDB: Compressed tables use zlib 1.2.8
2017-04-16 07:28:39 16301 [Note] InnoDB: Using Linux native AIO
2017-04-16 07:28:39 16301 [Note] InnoDB: Using CPU crc32 instructions
2017-04-16 07:28:39 16301 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2017-04-16 07:28:39 16301 [Note] InnoDB: Completed initialization of buffer pool
2017-04-16 07:28:39 16301 [ERROR] InnoDB: ./ibdata1 can't be opened in read-write mode
2017-04-16 07:28:39 16301 [ERROR] InnoDB: The system tablespace must be writable!
2017-04-16 07:28:39 16301 [ERROR] Plugin 'InnoDB' init function returned error.
2017-04-16 07:28:39 16301 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-04-16 07:28:39 16301 [ERROR] Unknown/unsupported storage engine: InnoDB
2017-04-16 07:28:39 16301 [ERROR] Aborting

2017-04-16 07:28:39 16301 [Note] Binlog end
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'partition'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'ARCHIVE'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_METRICS'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_CMPMEM'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_CMP'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_LOCKS'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'INNODB_TRX'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'BLACKHOLE'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'CSV'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'MEMORY'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'MyISAM'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'MRG_MYISAM'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'sha256_password'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'mysql_old_password'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'mysql_native_password'
2017-04-16 07:28:39 16301 [Note] Shutting down plugin 'binlog'
2017-04-16 07:28:39 16301 [Note] mysqld: Shutdown complete

/vr/log/mysql.log 有这个;

2017-04-16 07:05:53 16067 [Note] Plugin 'FEDERATED' is disabled.
2017-04-16 07:05:53 16067 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-04-16 07:05:53 16067 [Note] InnoDB: The InnoDB memory heap is disabled
2017-04-16 07:05:53 16067 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-04-16 07:05:53 16067 [Note] InnoDB: Memory barrier is not used
2017-04-16 07:05:53 16067 [Note] InnoDB: Compressed tables use zlib 1.2.8
2017-04-16 07:05:53 16067 [Note] InnoDB: Using Linux native AIO
2017-04-16 07:05:53 16067 [Note] InnoDB: Using CPU crc32 instructions
2017-04-16 07:05:53 16067 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2017-04-16 07:05:53 16067 [Note] InnoDB: Completed initialization of buffer pool
2017-04-16 07:05:53 16067 [Note] InnoDB: Highest supported file format is Barracuda.
2017-04-16 07:05:53 16067 [Note] InnoDB: The log sequence numbers 5067505 and 5067505 in ibdata files do not match the log sequence number 5071459 in the ib_logfiles!
2017-04-16 07:05:53 16067 [Note] InnoDB: Database was not shutdown normally!
2017-04-16 07:05:53 16067 [Note] InnoDB: Starting crash recovery.
2017-04-16 07:05:53 16067 [Note] InnoDB: Reading tablespace information from the .ibd files...
2017-04-16 07:05:54 16067 [Note] InnoDB: Restoring possible half-written data pages 
2017-04-16 07:05:54 16067 [Note] InnoDB: from the doublewrite buffer...
2017-04-16 07:05:54 16067 [Note] InnoDB: 128 rollback segment(s) are active.
2017-04-16 07:05:54 16067 [Note] InnoDB: Waiting for purge to start
2017-04-16 07:05:54 16067 [Note] InnoDB: 5.6.35 started; log sequence number 5071459
2017-04-16 07:05:54 16067 [Note] RSA private key file not found: /var/lib/mysql//private_key.pem. Some authentication plugins will not work.
2017-04-16 07:05:54 16067 [Note] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.
2017-04-16 07:05:54 16067 [Note] Server hostname (bind-address): '*'; port: 3306
2017-04-16 07:05:54 16067 [Note] IPv6 is available.
2017-04-16 07:05:54 16067 [Note]   - '::' resolves to '::';
2017-04-16 07:05:54 16067 [Note] Server socket created on IP: '::'.
2017-04-16 07:05:54 16067 [ERROR] Column count of mysql.events_waits_current is wrong. Expected 19, found 16. Created with MySQL 50554, now running 50635. Please use mysql_upgrade to fix this error.
2017-04-16 07:05:54 16067 [ERROR] Column count of mysql.events_waits_history is wrong. Expected 19, found 16. Created with MySQL 50554, now running 50635. Please use mysql_upgrade to fix this error.
2017-04-16 07:05:54 16067 [ERROR] Column count of mysql.events_waits_history_long is wrong. Expected 19, found 16. Created with MySQL 50554, now running 50635. Please use mysql_upgrade to fix this error.
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_host_by_event_name' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Incorrect definition of table performance_schema.events_waits_summary_by_thread_by_event_name: expected column 'THREAD_ID' at position 0 to have type bigint(20), found type int(11).
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_user_by_event_name' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_account_by_event_name' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Column count of mysql.file_summary_by_event_name is wrong. Expected 23, found 5. Created with MySQL 50554, now running 50635. Please use mysql_upgrade to fix this error.
2017-04-16 07:05:54 16067 [ERROR] Column count of mysql.file_summary_by_instance is wrong. Expected 25, found 6. Created with MySQL 50554, now running 50635. Please use mysql_upgrade to fix this error.
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'host_cache' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Incorrect definition of table performance_schema.mutex_instances: expected column 'LOCKED_BY_THREAD_ID' at position 2 to have type bigint(20), found type int(11).
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'objects_summary_global_by_type' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Incorrect definition of table performance_schema.rwlock_instances: expected column 'WRITE_LOCKED_BY_THREAD_ID' at position 2 to have type bigint(20), found type int(11).
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'setup_actors' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'setup_objects' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'table_io_waits_summary_by_index_usage' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'table_io_waits_summary_by_table' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'table_lock_waits_summary_by_table' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Column count of mysql.threads is wrong. Expected 14, found 3. Created with MySQL 50554, now running 50635. Please use mysql_upgrade to fix this error.
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'events_stages_current' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'events_stages_history' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'events_stages_history_long' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_thread_by_event_name' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_account_by_event_name' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_user_by_event_name' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_host_by_event_name' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'events_stages_summary_global_by_event_name' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'events_statements_current' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'events_statements_history' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'events_statements_history_long' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_thread_by_event_name' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_account_by_event_name' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_user_by_event_name' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_host_by_event_name' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'events_statements_summary_global_by_event_name' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_digest' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'users' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'accounts' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'hosts' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'socket_instances' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'socket_summary_by_instance' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'socket_summary_by_event_name' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'session_connect_attrs' has the wrong structure
2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'session_account_connect_attrs' has the wrong structure
2017-04-16 07:05:54 16067 [Note] Event Scheduler: Loaded 0 events
2017-04-16 07:05:54 16067 [Note] /usr/libexec/mysql56/mysqld: ready for connections.
Version: '5.6.35'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)
mysql
  • 1 1 个回答
  • 541 Views

1 个回答

  • Voted
  1. Best Answer
    jerichorivera
    2017-04-19T13:48:55+08:002017-04-19T13:48:55+08:00

    这些错误表明必须执行 mysql_upgrade:

    2017-04-16 07:28:39 16301 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
    2017-04-16 07:05:54 16067 [ERROR] Column count of mysql.events_waits_current is wrong. Expected 19, found 16. Created with MySQL 50554, now running 50635. Please use mysql_upgrade to fix this error.
    2017-04-16 07:05:54 16067 [ERROR] Column count of mysql.events_waits_history is wrong. Expected 19, found 16. Created with MySQL 50554, now running 50635. Please use mysql_upgrade to fix this error.
    2017-04-16 07:05:54 16067 [ERROR] Column count of mysql.events_waits_history_long is wrong. Expected 19, found 16. Created with MySQL 50554, now running 50635. Please use mysql_upgrade to fix this error.
    2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_host_by_event_name' has the wrong structure
    2017-04-16 07:05:54 16067 [ERROR] Incorrect definition of table performance_schema.events_waits_summary_by_thread_by_event_name: expected column 'THREAD_ID' at position 0 to have type bigint(20), found type int(11).
    2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_user_by_event_name' has the wrong structure
    2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_account_by_event_name' has the wrong structure
    2017-04-16 07:05:54 16067 [ERROR] Column count of mysql.file_summary_by_event_name is wrong. Expected 23, found 5. Created with MySQL 50554, now running 50635. Please use mysql_upgrade to fix this error.
    2017-04-16 07:05:54 16067 [ERROR] Column count of mysql.file_summary_by_instance is wrong. Expected 25, found 6. Created with MySQL 50554, now running 50635. Please use mysql_upgrade to fix this error.
    2017-04-16 07:05:54 16067 [ERROR] Native table 'performance_schema'.'host_cache' has the wrong structure
    2017-04-16 07:05:54 16067 [ERROR] Incorrect definition of table performance_schema.mutex_instances: expected column 'LOCKED_BY_THREAD_ID' at position 2 to have type bigint(20), found type int(11).
    

    虽然这些错误表明有关文件权限的问题:

    2017-04-16 07:28:39 16301 [ERROR] InnoDB: ./ibdata1 can't be opened in read-write mode
    2017-04-16 07:28:39 16301 [ERROR] InnoDB: The system tablespace must be writable!
    2017-04-16 07:28:39 16301 [ERROR] Plugin 'InnoDB' init function returned error.
    2017-04-16 07:28:39 16301 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    2017-04-16 07:28:39 16301 [ERROR] Unknown/unsupported storage engine: InnoDB
    2017-04-16 07:28:39 16301 [ERROR] Aborting
    

    第一个问题可以通过运行以下命令来解决:

    mysql_upgrade --upgrade-system-tables -uroot -p
    

    而第二个问题可以通过将文件所有权更改为 mysql:mysql 来解决

    chown -R mysql:mysql /path/to/datadir
    
    • 1

相关问题

  • 开源与专有关系 db mgt 系统的优缺点是什么?

  • 在 solaris 10 上为 mysql 设置 max_allowed_pa​​cket

  • 如何移动 MySQL 的数据目录?

  • 通过 VPN 连接什么是远程服务器 IP?

  • mysql崩溃

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve