- ubuntu12.04环境下使用kvm ioctl接口实现最简单的虚拟机
- Ubuntu 通过无线网络安装Ubuntu Server启动系统后连接无线网络的方法
- 在Ubuntu上搭建网桥的方法
- ubuntu 虚拟机上网方式及相关配置详解
CFSDN坚持开源创造价值,我们致力于搭建一个资源共享平台,让每一个IT人在这里找到属于你的精彩世界.
这篇CFSDN的博客文章MySQL修改innodb_data_file_path参数的一些注意事项由作者收集整理,如果你对这篇文章有兴趣,记得点赞哟.
前言 。
innodb_data_file_path用来指定innodb tablespace文件,如果我们不在My.cnf文件中指定innodb_data_home_dir和innodb_data_file_path那么默认会在datadir目录下创建ibdata1 作为innodb tablespace.
说明 。
在测试环境下没有设置过多的详细参数就初始化并启动了服务,后期优化的过程中发现innodb_data_file_path设置过小:
1
2
3
4
5
6
7
8
9
|
root@node1 14:59: [(none)]> show variables like
'%innodb_data_file_path%'
;
+-----------------------+------------------------+
| Variable_name | Value |
+-----------------------+------------------------+
| innodb_data_file_path | ibdata1:12M:autoextend |
+-----------------------+------------------------+
1 row
in
set
(0.00 sec)
root@node1 14:59: [(none)]>
|
当没有配置innodb_data_file_path时,默认innodb_data_file_path = ibdata1:12M:autoextend 。
1
2
|
[mysqld]
innodb_data_file_path = ibdata1:12M:autoextend
|
当需要改为1G时,不能直接在配置文件把 ibdata1 改为 1G .
1
2
|
[mysqld]
innodb_data_file_path = ibdata1:1G:autoextend
|
否则启动服务之后,从错误日志看到如下报错:
2019-03-29T06:47:32.044316Z 0 [ERROR] InnoDB: The Auto-extending innodb_system data file './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.
大致意思就是ibdata1的大小不是 65536page*16KB/1024KB=1G ,而是 786page*16KB/1024KB=12M (未使用压缩页) 。
方法一:推荐 。
而应该再添加一个 ibdata2:1G ,如下:
1
2
|
[mysqld]
innodb_data_file_path = ibdata1:12M;ibdata2:1G:autoextend
|
重启数据库! 。
方法二:不推荐 。
直接改为如下的话 。
1
2
|
[mysqld]
innodb_data_file_path = ibdata1:1G:autoextend
|
可以删除$mysql_datadir目录下 ibdata1、ib_logfile0、ib_logfile1 文件:
1
|
rm
-f ibdata* ib_logfile*
|
也可以启动MySQL,但是mysql错误日志里会报如下错误:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
2019-03-29T07:10:47.844560Z 0 [Warning] Could not increase number of max_open_files to
more
than 5000 (request: 65535)
2019-03-29T07:10:47.844686Z 0 [Warning] Changed limits: table_open_cache: 1983 (requested 2000)
2019-03-29T07:10:48.028262Z 0 [Warning]
'NO_AUTO_CREATE_USER'
sql mode was not
set
.
2019-03-29T07:10:48.147653Z 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
2019-03-29T07:10:48.147775Z 0 [ERROR] Can't
open
the mysql.plugin table. Please run mysql_upgrade to create it.
2019-03-29T07:10:48.163444Z 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
2019-03-29T07:10:48.163502Z 0 [Warning] Gtid table is not ready to be used. Table
'mysql.gtid_executed'
cannot be opened.
2019-03-29T07:10:48.163658Z 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
2019-03-29T07:10:48.163711Z 0 [Warning] Gtid table is not ready to be used. Table
'mysql.gtid_executed'
cannot be opened.
2019-03-29T07:10:48.164619Z 0 [Warning] Failed to
set
up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2019-03-29T07:10:48.166805Z 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.
2019-03-29T07:10:48.166891Z 0 [Warning] Failed to
open
optimizer cost constant tables
2019-03-29T07:10:48.168072Z 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.
2019-03-29T07:10:48.168165Z 0 [Warning] Can
't open and lock time zone table: Table '
mysql.time_zone_leap_second
' doesn'
t exist trying to live without them
2019-03-29T07:10:48.169454Z 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.
2019-03-29T07:10:48.169527Z 0 [ERROR] Can
't open and lock privilege tables: Table '
mysql.servers
' doesn'
t exist
2019-03-29T07:10:48.170042Z 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.
2019-03-29T07:10:48.170617Z 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.
2019-03-29T07:10:48.170946Z 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.
2019-03-29T07:10:48.171046Z 0 [Warning] Info table is not ready to be used. Table
'mysql.slave_master_info'
cannot be opened.
2019-03-29T07:10:48.171272Z 0 [Warning] InnoDB: Cannot
open
table mysql
/slave_worker_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.
2019-03-29T07:10:48.171626Z 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.
2019-03-29T07:10:48.171688Z 0 [Warning] Info table is not ready to be used. Table
'mysql.slave_relay_log_info'
cannot be opened.
|
总结 。
以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作具有一定的参考学习价值,谢谢大家对我的支持.
原文链接:https://www.linuxidc.com/Linux/2019-04/157915.htm 。
最后此篇关于MySQL修改innodb_data_file_path参数的一些注意事项的文章就讲到这里了,如果你想了解更多关于MySQL修改innodb_data_file_path参数的一些注意事项的内容请搜索CFSDN的文章或继续浏览相关文章,希望大家以后支持我的博客! 。
我正在运行PHP脚本,并继续收到如下错误: 注意:未定义的变量:第10行的C:\ wamp \ www \ mypath \ index.php中的my_variable_name 注意
我正在运行PHP脚本,并继续收到如下错误: 注意:未定义的变量:第10行的C:\ wamp \ www \ mypath \ index.php中的my_variable_name 注意
我正在运行PHP脚本,并继续收到如下错误: 注意:未定义的变量:第10行的C:\ wamp \ www \ mypath \ index.php中的my_variable_name 注意
我正在运行一个PHP脚本,并且继续收到如下错误:。第10行和第11行如下所示:。这些错误消息的含义是什么?。为什么他们突然出现了?我多年来一直使用这个脚本,从来没有遇到过任何问题。。我该怎么修理它们呢
当我在 flutter clean 之后运行 flutter run 或 debug my code 时显示此错误 Note: C:\src\flutter.pub-cache\hosted\pub.
My Goal: To fix this error and be able to run my app without an error. Error Message: Note:D:\Learni
前言:今天在解决一个问题时,程序总是不能输出正确值,分析逻辑思路没问题后,发现原来是由于函数传递导致了这个情况。 LeetCode 113 问题:给你二叉树的根节点
我正在 R 中开发一个包,当我运行时 devtools::check()我收到以下说明。 checking DESCRIPTION meta-information ... NOTE Malforme
获得通知和警告波纹管 Notice: Use of undefined constant GLOB_BRACE - assumed 'GLOB_BRACE' in /var/www/html/open
我正在准备一个 R 包以提交给 CRAN。 R CMD 检查给了我以下注意: Foreign function calls to a different package: .Fortran("cinc
我正在尝试从以下位置获取数据: http://api.convoytrucking.net/api.php?api_key=public&show=player&player_name=Mick_Gi
我有这段代码,但我不明白为什么我仍然有这个错误,我已经尝试了所有解决方案,但无法解决这个问题:-注意:未定义索引:product_price-注意:未定义索引:product_quantity-注意:
This question already has answers here: “Notice: Undefined variable”, “Notice: Undefined index”, and
我正在尝试从以下位置获取数据: http://api.convoytrucking.net/api.php?api_key=public&show=player&player_name=Mick_Gi
切记,在PHP 7中不要做的10件事 1. 不要使用 mysql_ 函数 这一天终于来了,从此你不仅仅“不应该”使用mysql_函数。PHP 7 已经把它们从核心中全部移除了,也就是说你需要迁移
前几天安装了dedecms系统,当在后台安全退出的时候,后台出现空白,先前只分析其他功能去了,也没太注意安全,看了一下安全退出的代码,是这样写的: 复制代码 代码如下: function ex
我使用此代码来检查变量$n0、$n1、$n2是否未定义。 但每次未定义时我都会收到通知。我的代码是一种不好的做法吗?还有什么替代方案吗?或者只是删除通知,代码就可以了? if
编写代码时处理所有警告是否重要?在我公司中具有较高资历的开发人员坚持认为警告是无害的。诚然,其中一些是: Warning: Division by zero Notice: Undefined ind
我有一个搜索查询,执行搜索查询后,我将$ result放入数组中。 我的PHP代码- $contents = $client->search($params); // executing the se
This question already has answers here: “Notice: Undefined variable”, “Notice: Undefined index”, and
我是一名优秀的程序员,十分优秀!