mysql5.7安装过程中,初始化的问题

更新时间:2023-05-20 23:07:49 阅读: 评论:0

mysql5.7安装过程中,初始化的问题
初始化不指定参数⽂件,如使⽤以下命令初始化:
./mysqld --initialize --ur=mysql --badir=/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/'.
2017-07-27T03:16:42.001140Z mysqld_safe Starting mysqld daemon with databas from/data/mysql/barry_mysql/data
2017-07-27T03:16:42.158846Z 0[Warning]'NO_AUTO_CREATE_USER' sql mode was not t.
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 f file: initial 65536
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 'id_executed' doesn't exist
2017-07-27T03:41:16.371369Z 0[Warning] Gtid table is not ready to be ud. id_executed' cannot be opened.
2017-07-27T03:41:16.413614Z 0[Warning] CA certificate ca.pem is lf 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/'.
2017-07-27T03:41:05.040377Z mysqld_safe Starting mysqld daemon with databas from/data/mysql/barry_mysql/data
2017-07-27T03:41:05.190872Z 0[Warning]'NO_AUTO_CREATE_USER' sql mode was not t.
1002003004005006007008009001000
1002003004005006007008009001000
1002003004005006007008009001000
1002003004005006007008009001000团美
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. Plea refer to /doc/refman/5.7/en/innodb-troubleshooting mysqld: Table'mysql.plugin' doesn't exist
2017-07-27T03:41:16.366637Z 0 [ERROR] Can't open the mysql.plugin table. Plea 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. Plea refer to /doc/refman/5.7/en/
精益思想
mysqld: id_executed' doesn't exist
2017-07-27T03:41:16.371369Z 0 [Warning] Gtid table is not ready to be ud. Table 'id_executed' cannot be opened.
2017-07-27T03:41:16.413614Z 0 [Warning] CA certificate ca.pem is lf signed.
2017-07-27T03:41:16.415576Z 0 [Warning] InnoDB: Cannot open table mysql/rver_cost from the internal data dictionary of InnoDB though the .frm file for the table exists. Plea refer to /doc/refman/5.7/en/innodb-troublesh 2017-07-27T03:41:16.415629Z 0 [Warning] Failed to open optimizer cost constant tables
2017-07-27T03:41:16.416613Z 0 [Warning] 'ur' entry 'root@localhost' ignored in --skip-name-resolve mode.
2017-07-27T03:41:16.416702Z 0 [Warning] 'ur' 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_cond from the internal data dictionary of InnoDB though the .frm file for the table exists. Plea refer to /doc/refman/5.7/en/inno 2017-07-27T03:41:16.417023Z 0 [Warning] Can't open and lock time zone table: Table'mysql.time_zone_leap_cond' 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/rvers from the internal data dictionary of InnoDB though the .frm file for the table exists. Plea refer to dev.m
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. Plea refer to /doc/refman/5.7/en/innodb-tro 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. Plea refer to /doc/refman/5.7/en/innodb-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. Plea refer to /doc/refman/5.7/en/innodb-tro 2017-07-27T03:41:16.418798Z 0 [Warning] Info table is not ready to be ud. 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/f --initialize-incure --ur=mysql
泰式火锅
(2) ibdata1初始化后不能删除,靠重启⽣成的ibdata1不可⽤。因为⾥⾯保存了系统表的数据。

本文发布于:2023-05-20 23:07:49,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/82/712762.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:参数   错误   系统   删除
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图