zoukankan      html  css  js  c++  java
  • 【MySQL】MySQL错误分析及解决

    1 error: log-error set to '/u01/data/mydb/3306/error/3306.err'

    错误描述:

    [root@strong ~]# service mysqld start
    Starting MySQL.2019-05-12T09:39:38.619861Z mysqld_safe error: log-error set to '/u01/data/mydb/3306/error/3306.err', however file don't exists. Create writable for user 'mysql'.
    ERROR! The server quit without updating PID file (/u01/data/mydb/3306/db/strong.oracle.com.pid).

    解决:

    [root@strong ~]# touch /u01/data/mydb/3306/error/3306.err
    [root@strong ~]# chown mysql:mysql /u01/data/mydb/3306/error/3306.err

    2 [ERROR] InnoDB: The Auto-extending innodb_system data file '/u01/data/mydb/3306/ibdata/ibdata1' is of a different size 768 pages (rounded down to MB) than specified in the .cnf file

    错误描述:

    2019-05-12T09:59:56.929556Z 0 [ERROR] InnoDB: The Auto-extending innodb_system data file '/u01/data/mydb/3306/ibdata/ibdata1' is of a dif
    ferent size 768 pages (rounded down to MB) than specified in the .cnf file: initial 1536 pages, max 0 (relevant if non-zero) pages!
    2019-05-12T09:59:56.929883Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
    2019-05-12T09:59:57.537660Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
    2019-05-12T09:59:57.537964Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    2019-05-12T09:59:57.537985Z 0 [ERROR] Failed to initialize builtin plugins.
    2019-05-12T09:59:57.537996Z 0 [ERROR] Aborting

    解决:

    出现这个错误的原因是ibdata1的大小和my.cnf中配置的不一致导致,将配置文件的该文件的大小改为和真实的文件大小一致即可。

    [root@strong ~]# ll -h /u01/data/mydb/3306/ibdata/ibdata1
    -rw-r-----. 1 mysql mysql 12M May 12 17:56 /u01/data/mydb/3306/ibdata/ibdata1

    3 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist

    错误描述:

    2019-05-12T10:07:34.841161Z 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
    2019-05-12T10:07:34.841196Z 0 [ERROR] Fatal error: Failed to initialize ACL/grant/time zones structures or failed to remove temporary table files.
    2019-05-12T10:07:34.841275Z 0 [ERROR] Aborting

    解决:

    出现这个错误的原因是配置文件的datadir设置有误,导致不能找到mysql数据库下的user表,修改配置即可。
    datadir=/u01/data/mydb/3306/db

  • 相关阅读:
    PyTorch 60 分钟入门教程:数据并行处理
    调参侠的末日? Auto-Keras 自动搜索深度学习模型的网络架构和超参数
    图片格式在线转换
    非常好的Oracle教程
    符号大全
    图片在线生成
    奥比岛人物立绘
    Linux 下的分屏利器-tmux安装、原理及使用
    CentOS7 安装极点五笔输入法
    zabbix监控服务搭建
  • 原文地址:https://www.cnblogs.com/alen-liu-sz/p/12975604.html
Copyright © 2011-2022 走看看