未加星标

MySQL的my-innodb-heavy-4G.ini配置文件的翻译

字体大小 | |
[数据库(mysql) 所属分类 数据库(mysql) | 发布者 店小二05 | 时间 2017 | 作者 红领巾 ] 0人收藏点击收藏
mysql的my-innodb-heavy-4G.ini配置文件的翻译

2小时前来源:cnblogs

我根据MySQL配置文件的英文文档说明,在根据自己所学的知识,使用有道词典对不懂的单词进行了查询,一个一个翻译出来的。有的专业术语翻译的不好,我使用了英文进行标注,例如主机(master)和副机(slave hosts),不知道如何翻译,所有在翻译后面加上了英文标识。

下面是这个MySQL的my-innodb-heavy-4G.in配置文件的中英对照版,如果有些地方解释的不对,希望大神可以指正。

所有以"注:"开头的都是翻译部分。

by the master's port number (3306 by default).392# 393# Example: 394# 395 # CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306, 396 # MASTER_USER='joe', MASTER_PASSWORD='secret'; 397# 398399 #注:第一种方案:使用 "CHANGE MASTER TO"命令(完整的描述在MySQL的使用手册中) 400 #"CHANGE MASTER TO"使用的语法及样例你可以参考什么的介绍,说的很详细 401402403# OR 404# 405 # 2) Set the variables below. However, incase you choose this method, then406 # start replication for the first time (even unsuccessfully, for example 407 # if you mistyped the password in master-password and the slave fails to 408 # connect), the slave will create a master.infofile, and any later 409 # changes in this file to the variable values below will be ignored and 410 # overridden by the content of the master.infofile, unless you shutdown 411 # the slave server, delete master.info and restart the slaver server. 412# For that reason, you may want to leave the lines below untouched 413# (commented) and instead use CHANGE MASTER TO (see above) 414# 415416#注:第二种方案:设置如下的变量,可是,如果你使用了这种方法,然后首次开启主从复制(即使你失败了,举个例子:如果你误输入主机(master) 417#的密码,副机(salve)将不会连接),这个副机将会创建一个master.info文件,之后里面的配置变量在下面的都会失效并且会用 418#主机(master)的master.info里面的内容来重写,除非你停止副机(slave),然后删除副机(slave)的master.info文件并且重新启动 419 #副机(slave)。对于这个理由,你可能立刻想放弃这个方案。使用"CHANGE MASTER TO"命令的方法可以参考什么 420421 # required unique id between 2 and 2^32 - 1422# (and different from the master) 423 # defaults to 2if master-host is set 424 # but will not function as a slave if omitted 425 #server-id = 2426427 #注:需要唯一的标识数id来标识这是一个副机(slave),不同于主机(master)。默认使用2如果主机(master-host)已经设置为1 428#但是如果这个值被遗漏,那么这个副机(slave)就不会执行副机有的功能 429430# 431 # The replication master for this slave - required 432 #master-host = <hostname> 433# 434435#注:指定主从复制的主机(master)对于副机(slave),这个是必须的 436437 # The username the slave will use for authentication when connecting 438 # to the master - required 439 #master-user =440441#注:这个主机(master)的用户名被用于副机(slave)连接主机的验证,这个参数是必须的 442443# The password the slave will authenticate with when connecting to 444 # the master - required 445 #master-password =446447#注:这个主机(master)的密码用于副机(slave)连接主机时候的认证 448449# The port the master is listening on. 450 # optional - defaults to 3306451 #master-port =452453#注:这个主机(master)所在的端口,默认为3306 454455 # Make the slave read-only. Only users with the SUPER privilege and the 456# replication slave thread will be able to modify data on it. You can 457# use this to ensure that no applications will accidently modify data on 458# the slave instead of the master 459#read_only 460461#注:read_only 数据只读性。使得副机(slave)保持只读的性质。只有拥有超级权限的用户和主从复制的线程才有权限去修改副机(slave) 462#你可以使用这个参数去确保没有应用可以去修改副机上面的数据 463464#以上的这些主从复制参数都被注释掉了,因为这些参数都用于副机(slave),而这里是主机 465466 #*** MyISAM Specific options #使用MyISAM存储引擎的一些特殊的参数 467468469 # Size of the Key Buffer, used to cache index blocks for MyISAM tables. 470 # Do not set it larger than 30% of your available memory, as some memory 471 # is also required by the OS to cache rows. Even if you're not using472 # MyISAM tables, you should still set it to 8-64M as it will also be 473 # used for internal temporary disk tables. 474 key_buffer_size = 32M 475476#注:key_buffer_size 是索引缓冲区的大小。用于缓存索引区块对于使用MyISAM储存的数据表 477 #不要设置他的值超过你内存的30%,因为操作系统也需要内存去去缓存行数据。即使你不使用MyISAM存储引擎 478 #你也需要设置key_buffer_size值为8-64M去用于存放内部的临时数据表 479480 # MyISAM uses special tree-like cache to make bulk inserts (that is, 481# INSERT ... SELECT, INSERT ... VALUES (...), (...), ..., and LOAD DATA 482 # INFILE) faster. This variable limits the size of the cache tree in483 # bytes per thread. Setting it to 0 will disable this optimisation. Do 484 # not set it larger than "key_buffer_size"for optimal performance. 485# This buffer is allocated when a bulk insert is detected. 486 bulk_insert_buffer_size = 64M 487488#注:bulk_insert_buffer_size 是MyISAM专属的树形缓冲区的大小。这个树形缓冲区主要用于 489#存放待插入的数据。bulk_insert_buffer_size将会限制树形缓冲区的大小对于每个线程,如果bulk_insert_buffer_size 490 #设置为0,那么这个功能将不可用。设置这个值不要超过"key_buffer_size"是最佳性能 491#这个缓冲区将会被分配当检测到插入数据的时候 492493 # This buffer is allocated when MySQL needs to rebuild the index in494 # REPAIR, OPTIMIZE, ALTER table statements as well as in LOAD DATA INFILE 495# into an empty table. It is allocated per thread so be careful with 496# large settings. 497 myisam_sort_buffer_size = 128M 498499# myisam_sort_buffer_size 是一个缓冲区,当MySQL需要重新修建索引在 REPAIR, OPTIMIZE, ALTER 数据表是或者 500#插入数据到一个空表中时,会分配这个缓冲区。这个缓冲区将会被分配到每个线程以至于很小心的对于大的设置 501502 # The maximum size of the temporary file MySQL is allowed to use while503# recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE. 504 # If the file-size would be bigger than this, the index will be created 505 # through the key cache (which is slower). 506 myisam_max_sort_file_size = 10G 507508#注:myisam_max_sort_file_size MySQL最大使用的临时文件大小当重建索引或者修改表或者加载数据时 509#如果文件大小超过这个设定的值,那么索引将会被创建在索引缓冲区中(这个行为会比较慢) 510511 # If a table has more than one index, MyISAM can use more than one 512 # thread to repair them by sorting in parallel. This makes sense if you 513# have multiple CPUs and plenty of memory. 514 myisam_repair_threads = 1515516517#注: myisam_repair_threads 是MyISAM开启的修理线程数量。当一个表有多个索引,MyISAM就会开启一个或者多个 518#修理线程去修理这些索引使他们并行的排序。如果想让这个变量有意义,那么你的机器需要有一个很复杂的CPU和大量的内存 519520# Automatically check and repair not properly closed MyISAM tables. 521myisam_recover 522523# myisam_recover 是一个控制,控制是否自动的检查和修理不正确关闭的数据表 524525 # *** INNODB Specific options *** #使用INNODB存储引擎的一些特殊的参数 526527 # Use this option if you have a MySQL server with InnoDB support enabled 528 # but you do not plan to use it. This will save memory and disk space 529# and speed up some things. 530 #skip-innodb 531532#注:使用这参数如果你的MySQL服务支持InnoDB,但是如果你不打算使用它,这个将会节约内存和磁盘空间 533#并且加速某些操作 534535# Additional memory pool that is used by InnoDB to store metadata 536 # information. If InnoDB requires more memory for this purpose it will 537# start to allocate it from the OS. As this is fast enough on most 538 # recent operating systems, you normally do not need to change this 539# value. SHOW INNODB STATUS will display the current amount used. 540 innodb_additional_mem_pool_size = 16M 541542#注: innodb_additional_mem_pool_size 额外的内存池大小由InnoDB去存储元数据 543#如果InnoDB需要更多的内存,他会直接找操作系统去要,这个操作是足够快的对于操作系统 544 #因此你正常情况下没必要去改变这个值。使用"SHOW INNODB STATUS"命令可以查看当前的 545#innodb_additional_mem_pool_size的值 546547# InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and 548 # row data. The bigger you set this the less disk I/O is needed to 549 # access data in tables. On a dedicated database server you may set this 550 # parameter up to 80% of the machine physical memory size. Do not set it 551# too large, though, because competition of the physical memory may 552 # cause paging in the operating system. Note that on 32bit systems you 553 # might be limited to 2-3.5G of user level memory per process, so do not 554# set it too high. 555 innodb_buffer_pool_size = 2G 556557#注:innodb_buffer_pool_size 是InnoDB用来存在索引和数据的缓冲区。InnoDB存储引擎和MyISAM不一样 558 #InnoDB使用缓存池来缓存索引和行数据。这个值你设置的越大,磁盘I/O消耗的就会越少 559 #在一个专门用于数据存储的服务器中,你可能设置这个参数的值为内存大小的80%。但是不要设置这个值过大 560#因为在和操作系统竞争物理内存的过程中会导致操作系统出现问题。在32位的操作系统中,这个值限制在 561 #2-3.5G在用户级别的程序中。总之不要设置这个过大 562563 # InnoDB stores data in one or more data files forming the tablespace. 564 # If you have a single logical drive for your data, a single 565 # autoextending file would be good enough. In other cases, a single file566# per device is often a good choice. You can configure InnoDB to use raw 567 # disk partitions as well - please refer to the manual formoreinfo568# about this. 569 innodb_data_file_path = ibdata1:10M:autoextend 570571#注: innodb_data_file_path 指定数据文件的路径。InnoDB存储数据使用的是多个数据文件来形成空间表 572#如果你有一个额外的逻辑分区来存在你的数据,单个的自填充文件是最好不过了。在另一方面 573#一系列简单的文件对于每个驱动来说都是一个好的选择。如果你想知道如何配置InnoDB使用 raw disk partitions 574#请参考使用手册 575576 # Set this option if you would like the InnoDB tablespace files to be 577 # stored in another location. By default this is the MySQL datadir. 578 #innodb_data_home_dir =579580#注: innodb_data_home_dir指定InnoDB数据文件的存在位置。你可以修改这个值来指定 581#数据文件的存在路径 582583 # Number of IO threads to use for async IO operations. This value is 584 # hardcoded to 4 on Unix, but on windows disk I/O may benefit from a 585# larger number. 586 innodb_file_io_threads = 4587588#注:innodb_file_io_threads 异步的IO线程数量对于业务的操作。这个值被写死为4在Unix 或者linux 589#在Windows下面,可以适当增加 590591# If you run into InnoDB tablespace corruption, setting this to a nonzero 592 # value will likely help you to dump your tables. Start from value 1 and 593 # increase it until you're able to dump the table successfully.594 #innodb_force_recovery=1595596#注:innodb_force_recovery 是InnoDB空间表的转储情况。如果你运行InnoDB空间表出错 597#设置这个值为一个非0的数将会帮助你去转储你的空间表。从1开始增长直到你的数据表转储完成 598599# Number of threads allowed inside the InnoDB kernel. The optimal value 600# depends highly on the application, hardware as well as the OS 601# scheduler properties. A too high value may lead to thread thrashing. 602 innodb_thread_concurrency = 16603604#注:innodb_thread_concurrency 指定InnoDB的线程并发数量。这个值允许低于InnoDB的内核 605#这个参数的最优值要依赖于具体的应用程序,硬件以及操作系统。太高的设置这个参数值将会导致 606#线程超负荷 607608 # If set to 1, InnoDB will flush (fsync) the transaction logs to the 609 # disk at each commit, which offers full ACID behavior. If you are 610# willing to compromise this safety, and you are running small 611 # transactions, you may set this to 0 or 2 to reduce disk I/O to the 612 # logs. Value 0 means that the log is only written to the log file and 613 # the log file flushed to disk approximately once per second. Value 2614 # means the log is written to the log file at each commit, but the log 615 # file is only flushed to disk approximately once per second. 616 innodb_flush_log_at_trx_commit = 1617618#注:innodb_flush_log_at_trx_commit 设置事务日志的级别。 619 #如果设置为1,那么每一次事务提交,就会把事务日志同步到磁盘,这样安全性高,但是占用较多的磁盘I/O 620 #如果设置为0,日志只会被写入日志文件,并且每隔1s刷新到磁盘,不怎么消耗I/O,但安全性较差 621 #如果设置为2,每次事务提交就会立刻写入日志文件,但是每隔1s才会同步到磁盘,不怎么消耗I/O,但安全性较差 622623 # Speed up InnoDB shutdown. This will disable InnoDB to do a full purge 624 # and insert buffer merge on shutdown. It may increase shutdown time a 625 # lot, but InnoDB will have to do it on the next startup instead. 626#innodb_fast_shutdown 627628#注: 加速InnoDB关闭的设置,这个设置将会废除InnoDB做整个数据的检查并且会保存到缓冲区中去 629#这个也可能增加InnoDB的关闭时间。但是InnoDB将会去做整个数据检查在下一次开机的时候 630631 # The size of the buffer InnoDB uses for buffering log data. As soon as 632# it is full, InnoDB will have to flush it to disk. As it is flushed 633 # once per second anyway, it does not make sense to have it very large 634 # (even with long transactions). 635 innodb_log_buffer_size = 8M 636637#注: innodb_log_buffer_size InnoDB日志缓冲区大小。只要日志缓冲区满了,InnoDB就会刷新日志到磁盘中 638#但是因为InnoDB每秒刷新一次日志到磁盘,所以没必要设置这个值太大(即使是很长的事务) 639640 # Size of each log filein a log group. You should set the combined size 641 # of log files to about 25%-100% of your buffer pool size to avoid 642 # unneeded buffer pool flush activity on log file overwrite. However, 643 # note that a larger logfile size will increase the time needed for the 644# recovery process. 645 innodb_log_file_size = 256M 646647#注: innodb_log_file_size是在一组日志文件中,每个日志文件的大小。你可以综合设置日志文件的大小 648 #为 "innodb_buffer_pool_size"(索引和数据缓冲区)大小的25%-100% 去避免因日志文件满而进行的刷新重新操作。 649#记住如果innodb_log_file_size值过大将会增加恢复进程的处理时间 650651 # Total number of files in the log group. A value of 2-3 is usually good 652# enough. 653 innodb_log_files_in_group = 3654655 #注: innodb_log_files_in_group是每个日志组里面日志的总数量。2-3个比较合适 656657# Location of the InnoDB log files. Default is the MySQL datadir. You 658 # may wish to point it to a dedicated hard drive or a RAID1 volume for659# improved performance 660#innodb_log_group_home_dir 661662#注:InnoDB的日志存储路径。默认为MySQL的datadir。你可能想指定这个路径到一个专用的RAID1设备 663#去提高MySQL的性能 664665 # Maximum allowed percentage of dirty pages in the InnoDB buffer pool. 666# If it is reached, InnoDB will start flushing them out agressively to 667# not run out of clean pages at all. This is a soft limit, not 668# guaranteed to be held. 669 innodb_max_dirty_pages_pct = 90670671#注: innodb_max_dirty_pages_pct是InnoDB允许在缓存池内脏页(dirty pages)占的最大比例。如果超出了这个比例 672#InnoDB将会去刷新这些脏页(dirty pages)但是不会用光这些干净页(dirty pages). 673#这个一个软的限制,不能保证会执行 674675 # The flush method InnoDB will use for Log. The tablespace always uses 676 # doublewrite flush logic. The default value is "fdatasync", another 677 # option is "O_DSYNC". 678 #innodb_flush_method=O_DSYNC 679680#注:InnoDB的日志刷新方式,InnoDB总是使用双向写(doublewrite)的方式来刷新日志。 681 #默认值是"fdatasync",还有一个值是O_DSYNC。如果想了解更多的日志刷新方式和脏页(dirty pages), 682#可以参考下面的链接 683 http://684685 # How long an InnoDB transaction should waitfor a lock to be granted 686# before being rolled back. InnoDB automatically detects transaction 687 # deadlocks in its own lock table and rolls back the transaction. If you 688 # use the LOCK TABLES command, or other transaction-safe storage engines 689 # than InnoDB in the same transaction, then a deadlock may arise which690# InnoDB cannot notice. In cases like this the timeout is useful to 691# resolve the situation. 692 innodb_lock_wait_timeout = 120693694#注: innodb_lock_wait_timeout是InnoDB锁等待的超时时间。InnoDB将会自动的发现死锁在 695 #他的锁表中并且会回滚这些事务。如果你使用"LOCK TABLES"命令或者其他事务安全存储引擎 696#在同一个事务中,死锁可能使InnoDB连接不敏感,使用这个超时参数会很有用的去解决这个问题 697698699[mysqldump] 700 # Do not buffer the whole result set in memory before writing it to 701 # file. Required for dumping very large tables 702quick 703704#注:MySQL数据转储。在把数据转储之前,不会缓存整个结果在内存中。适用于转储数据量很大的表 705706 max_allowed_packet = 16M 707708#注:参阅141行 709710[mysql] 711 no-auto-rehash 712713#注:MySQL不自动刷新 714715# Only allow UPDATEs and DELETEs that use keys. 716 #safe-updates 717718#安全的更新,只允许更新和删除使用索引 719720[myisamchk] 721 key_buffer_size = 512M #参考474行 722 sort_buffer_size = 512M #参考191行 723 read_buffer = 8M #读缓冲区大小 724 write_buffer = 8M #写缓冲区大小 725726[mysqlhotcopy] 727 interactive-timeout 728729#注:服务器关闭交互式连接前等待活动的秒数。交互式客户端定义为在mysql_real_connect中使用CLIENT_INTERACTIVE选项的客户端。 730#参数默认值:28800秒(8小时) 731732[mysqld_safe] 733# Increase the amount of open files allowed per process. Warning: Make 734 # sure you have set the global system limit high enough! The high value 735 # is required for a large number of opened tables 736 open-files-limit = 8192737738#注:MySQL的安全性参数,开放文件的数量。允许每个进程去增加开放文件的数量 739 #警告:确保你已经做了全局系统的限制。这个值需要被增大当有大量的开放表被使用的时候。

本文数据库(mysql)相关术语:navicat for mysql mysql workbench mysql数据库 mysql 存储过程 mysql安装图解 mysql教程 mysql 管理工具

分页:12
转载请注明
本文标题:MySQL的my-innodb-heavy-4G.ini配置文件的翻译
本站链接:http://www.codesec.net/view/530394.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 数据库(mysql) | 评论(0) | 阅读(69)