初始化不指定参数文件,如使用以下命令初始化:
./mysqld --initialize --user=mysql --basedir=/data/mysql/barry_mysql --datadir=/data/mysql/barry_mysql/data
 
初始化后 ibdata1文件大小是默认的12M,如果参数文件中指定的是1G,则启动报如下错误。
2017-07-27T03:16:41.916500Z mysqld_safe Logging to '/data/mysql/barry_mysql/logs/barry-mysql.err'.
2017-07-27T03:16:42.001140Z mysqld_safe Starting mysqld daemon with databases from /data/mysql/barry_mysql/data
2017-07-27T03:16:42.158846Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2017-07-27T03:16:42.462038Z 0 [ERROR] InnoDB: The Auto-extending innodb_system data file '/data/mysql/barry_mysql/data/ibdata1' is of a different size 768 pages (rounded down to MB) than specified in the .cnf file: initial 65536 pages, max 0 (relevant if non-zero) pages!
2017-07-27T03:16:42.462105Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2017-07-27T03:16:43.563231Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2017-07-27T03:16:43.563302Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-07-27T03:16:43.563323Z 0 [ERROR] Failed to initialize plugins.
2017-07-27T03:16:43.563338Z 0 [ERROR] Aborting 2017-07-27T03:16:43.626546Z mysqld_safe mysqld from pid file /data/mysql/barry_mysql/tmp/mysql.pid ended

如果修改参数文件为12M,则可以正常启动。

如果不修改参数文件,而是将ibdata1删除,起动后会重新生成个1G的ibdata1,那么启动会报如下错误,且报错的几个表不能正常查看。

2017-07-27T03:41:16.224833Z 0 [Warning] InnoDB: New log files created, LSN=45791
mysqld: Table 'mysql.plugin' doesn't exist
mysqld: Table 'mysql.gtid_executed' doesn't exist
2017-07-27T03:41:16.371369Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2017-07-27T03:41:16.413614Z 0 [Warning] CA certificate ca.pem is self signed.
2017-07-27T03:38:27.049543Z 3 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
2017-07-27T03:38:27.050140Z 3 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
2017-07-27T03:40:01.619183Z mysqld_safe mysqld from pid file /data/mysql/barry_mysql/tmp/mysql.pid ended
2017-07-27T03:41:04.955142Z mysqld_safe Logging to '/data/mysql/barry_mysql/logs/barry-mysql.err'.
2017-07-27T03:41:05.040377Z mysqld_safe Starting mysqld daemon with databases from /data/mysql/barry_mysql/data
2017-07-27T03:41:05.190872Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
100 200 300 400 500 600 700 800 900 1000
100 200 300 400 500 600 700 800 900 1000
100 200 300 400 500 600 700 800 900 1000
100 200 300 400 500 600 700 800 900 1000
2017-07-27T03:41:16.224833Z 0 [Warning] InnoDB: New log files created, LSN=45791
2017-07-27T03:41:16.275795Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2017-07-27T03:41:16.366508Z 0 [Warning] InnoDB: Cannot open table mysql/plugin from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue.
mysqld: Table 'mysql.plugin' doesn't exist
2017-07-27T03:41:16.366637Z 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2017-07-27T03:41:16.371317Z 0 [Warning] InnoDB: Cannot open table mysql/gtid_executed from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue.
mysqld: Table 'mysql.gtid_executed' doesn't exist
2017-07-27T03:41:16.371369Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2017-07-27T03:41:16.413614Z 0 [Warning] CA certificate ca.pem is self signed.
2017-07-27T03:41:16.415576Z 0 [Warning] InnoDB: Cannot open table mysql/server_cost from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue.
2017-07-27T03:41:16.415629Z 0 [Warning] Failed to open optimizer cost constant tables 2017-07-27T03:41:16.416613Z 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
2017-07-27T03:41:16.416702Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
2017-07-27T03:41:16.416761Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
2017-07-27T03:41:16.416792Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
2017-07-27T03:41:16.416986Z 0 [Warning] InnoDB: Cannot open table mysql/time_zone_leap_second from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue.
2017-07-27T03:41:16.417023Z 0 [Warning] Can't open and lock time zone table: Table 'mysql.time_zone_leap_second' doesn't exist trying to live without them
2017-07-27T03:41:16.417647Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
2017-07-27T03:41:16.417846Z 0 [Warning] InnoDB: Cannot open table mysql/servers from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue.
2017-07-27T03:41:16.417874Z 0 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
2017-07-27T03:41:16.418373Z 0 [Warning] InnoDB: Cannot open table mysql/slave_master_info from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue.
2017-07-27T03:41:16.418579Z 0 [Warning] InnoDB: Cannot open table mysql/slave_relay_log_info from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue.
2017-07-27T03:41:16.418763Z 0 [Warning] InnoDB: Cannot open table mysql/slave_master_info from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue.
2017-07-27T03:41:16.418798Z 0 [Warning] Info table is not ready to be used. Table 'mysql.slave_master_info' cannot be opened.
2017-07-27T03:41:16.418819Z 0 [ERROR] Error in checking mysql.slave_master_info repository info type of TABLE.
2017-07-27T03:41:16.418833Z 0 [ERROR] Error creating master info: Error checking repositories.
2017-07-27T03:41:16.418842Z 0 [ERROR] Failed to create or recover replication info repository.
2017-07-27T03:41:16.418857Z 0 [ERROR] Failed to create or recover replication info repositories.

根据以上实验总结:

(1) 初始化的时候 应该指定参数文件,这样ibdata1就是自己设定的1G
  ./bin/mysqld --defaults-file=/data/mysql/barry_mysql/etc/my.cnf --initialize-insecure --user=mysql   
(2) ibdata1初始化后不能删除,靠重启生成的ibdata1不可用。因为里面保存了系统表的数据。

mysql 5.7安装过程中,初始化的问题的更多相关文章

  1. MySQL 5.7 安装过程中遇到的坑

    在安装的过程中遇到了几个坑,特地记录下来.启动的时候会有有个错误: 大意为mysql退出且更新不了pid文件. 查看error.log,如图: 大意为ibdtata1文件不够,初始化的时候页数太大.初 ...

  2. mysql安装过程中出现错误ERROR 1820 (HY000): You must SET PASSWORD before executing this statement解决

    mysql安装过程中出现错误ERROR 1820 (HY000): You must SET PASSWORD before executing this statement解决   最近新装好的my ...

  3. mysql安装过程中出现的错误问题解决方案

    最近在学Django,因为与数据库相关,所以我下载并安装了MySQL,安装的过程真的是一把辛酸泪啊.安装过后,查看是否可以使用,出现了cann't connect to mysql server这个错 ...

  4. Mysql安装过程中出现apply security settings错误的解决方法

    在学习Mysql的过程中,首先要安装Mysql.然而在第一遍安装过程中难免会出现安装错误的时候,当卸载后第二次安装(或者第三次甚至更多次)的时候,往往在安装最后一步会出现apply security ...

  5. MySQL安装过程中对The error code is 2203的解决方案

    MySQL安装过程中对The error code is 2203的解决方案 1.问题描述 Windows系统安装MySQL遇到The error code is 2203.,具体描述如下 The i ...

  6. 用友ERP-U8最新破解(再次更新版本,附安装过程中的解决办法)

    新版用友u8.70下载地址:http://ftp.shangyuchem.com/应用软件/用友ERP-U8管理软件(8.70版).rar 准备好安装环境,因为需要SQLSERVER和IIS支持,而个 ...

  7. MySQL5.7 安装过程中出现 attempting to start service 过不去

    MySQL5.7 安装过程中出现 attempting to start service 过不去. 1,机制打开服务,把MySql服务名启动(我的是MySqlAliyun) 启动失败:提示1067错误 ...

  8. Ubuntu hive 安装过程中遇到的一些问题

    环境:Ubuntu14.04 Hadoop3.2.0 MySQL5.7 hive2.3.6 安装步骤:安装hive.MySQL并进行配置 安装过程参照:Ubuntu安装hive,并配置mysql作为元 ...

  9. JAVA安装过程中出现的“javac不是内部或外部指令”的解决方法

    近来重新安装了JAVA,安装过程中出现问题,网上找到解决办法,汇总发布. 解决流程: 1.确定自己的环境变量设置没问题,没有出现遗漏 : . 等情况 (具体环境变量设置百度) 2.环境变量设置后 ,d ...

随机推荐

  1. oracle多表关联多字段update

    多表关联多字段update 有代码有J8: update spatial_references set( auth_name, auth_srid, falsex, falsey, xyunits, ...

  2. 从Script到Code Blocks、Code Behind到MVC、MVP、MVVM(转载)

    http://www.cnblogs.com/indream/p/3602348.html 刚过去的周五(3-14)例行地主持了技术会议,主题正好是<UI层的设计模式——从Script.Code ...

  3. java 编码设置

  4. A - BBQ Easy

    Score : 200 points Problem Statement Snuke is having a barbeque party. At the party, he will make N  ...

  5. 以太坊 EVM内交易执行分析(二)

    接着上次的分析,分析一下run方法是如何执行智能合约的.至于以太币的交易,在上一篇中,已经由分析的那两个函数完成了: 合约的运行是从run开始的,go-ethereum/core/vm/evm.go  ...

  6. leetcode 783. Minimum Distance Between BST Nodes 以及同样的题目 530. Minimum Absolute Difference in BST

    Given a Binary Search Tree (BST) with the root node root, return the minimum difference between the ...

  7. jQuery入坑指南

    前言 Ajax官方文档 爱jQuery jQuery插件库 jQuery中文api input 赋值和取值 记录一下: 在写一个input赋值,二话不说就直接利用了$('#xx').val()来进行取 ...

  8. java面试(上)

    http://blog.csdn.net/jackfrued/article/details/44921941 1.面向对象的特征有哪些方面? 答:面向对象的特征主要有以下几个方面: - 抽象:抽象是 ...

  9. 洛谷 P3953 逛公园【spfa+记忆化dfs+bfs】

    spfa预处理出最短路数组dis,然后反向建边bfs出ok[u]表示u能到n点 然后发现有0环的话时候有inf解的,先dfs找0环判断即可 然后dfs,设状态f[u][v]为到u点,还可以跑最短路+v ...

  10. bzoj 1913: [Apio2010]signaling 信号覆盖【旋转卡壳(?)】

    参考:https://blog.csdn.net/qpswwww/article/details/45334033 讲的很清楚 做法比较像旋转卡壳但是具体是不是我也不清楚.. 首先知道只要求出每种方案 ...