• notice
  • Congratulations on the launch of the Sought Tech site

Mysql configuration file basic parameter details

# The following options will be read by the MySQL client application.

# Note that only client applications shipped with MySQL are guaranteed to be able to read this content.

# If you want your own MySQL application to get these values

# These options need to be specified when the MySQL client library is initialized

#

[client]

#password=[your_password]

port=@MYSQL_TCP_PORT@

socket=@MYSQL_UNIX_ADDR@

#  MySQL server

[mysqld]

# General configuration options

port=@MYSQL_TCP_PORT@

socket=@MYSQL_UNIX_ADDR@

# back_log is the number of connections the operating system can keep in the listening queue,

# The queue holds connections before they are processed by the MySQL connection manager thread.

# If you have a very high connection rate and get a "connection refused" error,

# You should increase the value here.

# Check your operating system documentation for the maximum value of this variable.

# Setting back_log to a value higher than your OS limit will have no effect

back_log=50

# Do not listen on TCP/IP ports.

# If all processes are connected to the local server on the same server mysqld,

# This will be a way to enhance security

# All mysqld connections are made through Unix sockets or named pipes.

# Note that if the named pipes option is not turned on under windows, just use this

# (via the "enable-named-pipe" option) will cause the mysql service to have no effect!

#skip-networking

# The upper limit of the number of simultaneous sessions allowed by the MySQL service

# One of the connections will be reserved with SUPER privileges to log in as admin.

# Even if the maximum number of connections has been reached.

max_connections=100

# The maximum number of errors allowed per client connection, if this limit is reached.

# This client will be blocked by the MySQL service until a "FLUSH HOSTS" is executed or the service is restarted

# Illegal passwords and other link-time errors will increase this value.

# View "Aborted_connects" status to get global counters.

max_connect_errors=10

# The number of tables opened by all threads.

# Increasing this value increases the number of file descriptors required by mysqld

# This way you need to make sure that the "open-files-limit" variable in [mysqld_safe] is set to allow at least 4096 open files


table_cache=2048

# Allow external file level locks.Opening file locks can negatively impact performance

# So only use this option if you are running multiple DB instances on the same file (note there are still other constraints!)

# Or you are using some other software dependency at the file level to lock the MyISAM table

#external-locking

# The maximum size of request packets the service can handle and the maximum request size the service can handle (necessary when working with large BLOB fields)

# The size of each connection is independent.The size is dynamically increased

max_allowed_packet=16M

# The size of the cache held by binlog to record SQL state within a transaction

# If you frequently use large, multi-statement transactions, you can increase this value for greater performance.

# All state from the transaction will be buffered in the binlog buffer and then written to the binlog once after the commit

# If the transaction is larger than this value, a temporary file on disk will be used instead.

# This buffer is created the first time the state is updated for each connected transaction

binlog_cache_size=1M

# The maximum size allowed for a separate memory table.

# This option is used to prevent accidental creation of a very large memory table that will cause all memory resources to be exhausted forever.

max_heap_table_size=64M

# The sort buffer is used to handle sorts caused by queues like ORDER BY and GROUP BY

# If the sorted data cannot fit into the sort buffer,

# An alternative disk-based merge sort will be used

# View the "Sort_merge_passes" status variable.

# Assigned by each thread when sorting occurs

sort_buffer_size=8M

# This buffer is used to optimize full joins (full JOINs without indexes).

# Similar unions have very bad performance in most cases,

# However, setting this value to a higher value can reduce the performance impact.

# Check the number of full joins through the "Select_full_join" state variable

# When full union occurs, allocate in each thread

join_buffer_size=8M

# How many threads do we keep in the cache for reuse

# When a client disconnects, if the threads in the cache are less than thread_cache_size,

# The client thread is put into the cache.

# This can greatly reduce thread creation overhead when you need a lot of new connections

# (Generally if you have a good threading model, this won't give you a noticeable performance boost.)

thread_cache_size=8

# This allows the application to give the threading system a hint about the number of threads that are eager to be run at the same time.

# This value is only meaningful on systems that support the thread_concurrency() function (eg Sun Solaris).

# You can try to use [Number of CPUs]*(2..4) as the value of thread_concurrency

thread_concurrency=8

# Query buffering is often used to buffer the results of SELECT and return the results without executing the same query next time.

# Turning on query buffering can greatly improve server speed if you have a lot of identical queries and rarely modify tables.

# Look at the "Qcache_lowmem_prunes" status variable to check if the current value is high enough for your load.

# Note: In case your table changes frequently or if your query text is different every time,

# Query buffering may cause performance degradation rather than performance improvement.


query_cache_size=64M

# Only results less than this set value will be buffered

# This setting is used to protect the query buffer, preventing a very large result set from overwriting all other query results.

query_cache_limit=2M

# Minimum word length to be indexed by full-text search.

# You may want to reduce it if you need to search for shorter words.

# Note that after you modify this value,

# You need to rebuild your FULLTEXT index

ft_min_word_len=4

# If your system supports the memlock() function, you may want to turn this option on to allow the running mysql to run under high memory constraints,

Data remains locked in memory and prevents possible swapping out

# This option is good for performance

#memlock

# As the default table type to use when creating new tables,

# This value will be used if the table type is not specifically implemented when creating the representation

default_table_type=MYISAM

# The heap size used by the thread.This amount of memory is reserved for each connection.

# MySQL itself does not usually require more than 64K of memory

# If you use your own UDF functions that require a lot of heap

# Or your OS needs more heap for some operations,

# You may need to set this higher.

thread_stack=192K

# Set the default transaction isolation level.The available levels are as follows:

# READ-UNCOMMITTED, READ-COMMITTED, REPEATABLE-READ, SERIALIZABLE

transaction_isolation=REPEATABLE-READ

# Maximum size of internal (in-memory) temporary tables

# If a table grows larger than this value, it will be automatically converted to a disk-based table.

# This limit is for a single table, not a sum.

tmp_table_size=64M

# Enable binary logging.

# In the replication configuration, this must be turned on as the MASTER master server

# If you need to do point-in-time recovery from your last backup, you also need the binary log.

log-bin=mysql-bin

# If you are using replication mode with chained slave structure (A->B->C),

# You need to open this on server B.

# This option turns on a log of updates redone on the slave thread,

# and write it to the slave's binary log.

#log_slave_updates

# Open the full query log.All queries received by the server (even for a query with bad syntax)

# will be logged.This is useful for debugging and is often turned off in production environments.

#log

# Print warnings to the error log file. If you have any questions about MySQL

# You should turn on the warning log and carefully review the error log for possible causes.

#log_warnings

# Log slow queries.A slow query is one that consumes more time than defined by "long_query_time".

# If log_long_format is turned on, queries that do not use indexes will also be logged.

# If you frequently add new queries to an existing system.Generally this is a good idea,

log_slow_queries

# All queries that use more than this time (in seconds) will be considered slow queries.

# Don't use "1" here, otherwise it will cause all queries, even very fast query pages to be logged (since MySQL's current time accuracy can only reach the level of seconds).


long_query_time=2

# Record more information in the slow log.

# Generally, this item is best to open.

# Turning this on will log so that queries that do not use indexes are also appended to the slow log as slow queries

log_long_format

# This directory is used by MySQL to store temporary files.For example,

# It is used to handle large disk-based sorts, just like internal sorts.

# and simple temp tables.

# If you don't create very large temporary files, it may be better to put them on the swapfs/tmpfs filesystem

# Another option is that you can also place it on a separate disk.

# You can use ";" to place multiple paths

# They will be polled using the roud-robin method.

#tmpdir=/tmp

# ***  Copy related settings

# Unique service identification number, the value is between 1 and 2^32-1.

# This value needs to be set on both master and slave.

# If "master-host" is not set, it defaults to 1, but if this option is omitted, MySQL will not take effect as master.

server-id=1

# The copied Slave (uncomment the master section to make it effective)

#

# To configure this host as a replicated slave server, you can choose between two methods:

#

# 1) Use the CHANGE MASTER TO command (full description in our manual)-

#    The syntax is as follows:

#

#    CHANGE MASTER TO MASTER_HOST=, MASTER_PORT=,

#    MASTER_USER=, MASTER_PASSWORD=;

#

#    You need to replace,,fields surrounded by angle brackets and replacewith the port number of the master (default 3306).

#

#    Example:

#

#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,

#    MASTER_USER='joe', MASTER_PASSWORD='secret';

#

# or

#

# 2) Set the following variables.Anyway, if you choose this method, then start the replication for the first time (even unsuccessfully,

#     e.g.if you enter the wrong password in the master-password field and the slave cannot connect),

#    slave will create a master.info file and any subsequent changes to parameters contained in this file will be ignored

#    And overwritten by the contents of the master.info file, unless you shut down the slave service, delete master.info and restart the slave service.

#    For this reason, you may not want to touch the config (commented out) and use CHANGE MASTER TO (see above) instead

#

# The required unique id number is between 2 and 2^32-1

# (and different from master)

# If master-host is set.The default value is 2

# But if omitted, it will not take effect

#server-id=2

#

# master in replication structure-required

#master-host=

#

# The username used by the slave to authenticate when connecting to the master-required

#master-user=

#

# The password used by the slave to authenticate when connecting to the master-required

#master-password=

#

# The port the master listens on.

# optional-default is 3306

#master-port=

# Make the slave read-only.Only the user with SUPER permission and the slave thread on it can modify the data.

# You can use this to ensure that no application accidentally modifies data on a slave other than the master


#read_only

#*** MyISAM related options

# The size of the keyword buffer, generally used to buffer the index blocks of the MyISAM table.

# Don't set it larger than 30% of your available memory,

# Because part of the memory is also used by the OS to buffer line data

# Even if you are not using MyISAM tables, you still need to set up 8-64M of memory as it will also be used by the internal temp disk table.

key_buffer_size=32M

# Buffer size for full table scan of MyISAM table.

# When a full table scan is required, allocate in the corresponding thread.

read_buffer_size=2M

# When rows are read from an already sorted sequence after sorting, row data will be read from this buffer to prevent disk seeks.

# If you increase this value, you can improve the performance of a lot of ORDER BY.

# allocated by each thread when needed

read_rnd_buffer_size=16M

# MyISAM uses a special tree-like cache to make burst inserts

# (These inserts are, INSERT...SELECT, INSERT...VALUES (...), (...),..., and LOAD DATA

# INFILE) is faster.This variable limits the number of bytes of the buffer tree per process.

# Setting to 0 will turn off this optimization.

# For optimization do not set this value larger than "key_buffer_size".

# This buffer will be allocated when a burst insertion is detected.

bulk_insert_buffer_size=64M

# This buffer is allocated when MySQL needs to cause index rebuilding on REPAIR, OPTIMIZE, ALTER and LOAD DATA INFILE into an empty table.

# This is allocated per thread.So be careful when setting large values.

myisam_sort_buffer_size=128M

# Maximum size of temporary files allowed by MySQL when rebuilding indexes (when REPAIR, ALTER TABLE or LOAD DATA INFILE).

# If the file size is larger than this value, the index will be created through the key-value buffer (slower)

myisam_max_sort_file_size=10G

# If the temporary file used to create the index is larger than the specified value, then use the key-value buffer method.

# This is mainly used to force long string keys in large tables to use the slow key-value buffer method to create indexes.

myisam_max_extra_sort_file_size=10G

# If a table has more than one index, MyISAM can use more than one thread to repair them through parallel sorting.

# This is a good choice for users with multiple CPUs and a lot of memory.

myisam_repair_threads=1

# Automatically check and repair MyISAM tables that are not properly closed.

myisam_recover

# Federated is disabled by default

skip-federated

# If your MySQL server includes InnoDB support but is not going to use it,

# Using this option will save memory and disk space, and speed up some parts

#skip-innodb

# Additional memory pool is used by InnoDB to store metadata information

# If InnoDB needs more memory for this purpose, it will start requesting memory from the OS.

# Since this operation is fast enough on most modern operating systems, you generally do not need to modify this value.

# The SHOW INNODB STATUS command will display the number currently in use.

innodb_additional_mem_pool_size=16M

# InnoDB uses a buffer pool to hold indexes and raw data, unlike MyISAM.

# The larger you set here, the less disk I/O you need to access data in the table.

# On a standalone database server, you can set this variable to 80% of the server's physical memory size

# Do not set too large, otherwise, the operating system may cause page thrashing due to physical memory competition.

# Note that on 32-bit systems you may be limited to 2-3.5G user-level memory limit per process,

# So don't set it too high.


innodb_buffer_pool_size=2G

# InnoDB stores data in one or more data files as tablespaces.

# If you only have a single logical driver to hold your data, a single auto-incrementing file is good enough.

# In other cases, one file per device is generally a good choice.

innodb_data_file_path=ibdata1:10M:autoextend

# Set this option if you want InnoDB tablespace files to be stored in other partitions.

# By default it is stored in MySQL's datadir.

#innodb_data_home_dir=

# The number of IO threads used to synchronize IO operations.This value is

# This value is hardcoded to 4 under Unix, but disk I/O on Windows may perform better with a larger value.

innodb_file_io_threads=4

# If you find InnoDB tablespace corruption, setting this value to a non-zero value may help you export your table.

# Start at 1 and increase this value until you can successfully export the table.

#innodb_force_recovery=1

# The number of threads allowed within an InnoDb core.

# The optimal value depends on the application, hardware and how the operating system is scheduled.

# Too high a value may cause thread mutex thrashing.

innodb_thread_concurrency=16

# If set to 1, InnoDB will flush (fsync) the transaction log to disk after each commit,

# This provides full ACID behavior.

# If you are willing to compromise on transaction security, and you are running a small food, you can set this value to 0 or 2 to reduce disk I/O caused by the transaction log

# 0 means that the log is only written to the log file approximately every second and the log file is flushed to disk.

# 2 means that the log is written to the log file after each commit, but the log file is only flushed to disk approximately every second.

innodb_flush_log_at_trx_commit=1

# Speed up InnoDB shutdown.This prevents InnoDB from doing full cleans and insert buffer merges on shutdown.

# This may greatly increase the shutdown time, but instead InnoDB may do this on the next startup.

#innodb_fast_shutdown

# The size of the buffer used to buffer log data.

# When this value is nearly full, InnoDB will have to flush data to disk.

# Since it is flushed basically every second, there is no need to set this value too large (even for long transactions)

innodb_log_buffer_size=8M

# The size of each log file in the log group.

# You should set the total log file size to 25%~100% of your buffer pool size

# to avoid unnecessary buffer pool flushing on log file overwrites.

# However, please note that a large log file size will increase the time required for the recovery process.

innodb_log_file_size=256M

# The total number of files in the log group.

# Usually 2~3 is better.

innodb_log_files_in_group=3

# The location of InnoDB's log files.The default is MySQL's datadir.

# You can assign it to a separate hard drive or a RAID1 volume to improve its performance

#innodb_log_group_home_dir

# The maximum allowed percentage of dirty pages in the InnoDB buffer pool.

# If the limit is reached, InnoDB will start flushing them to prevent them from blocking clean data pages.

# This is a soft limit and is not guaranteed to be absolutely enforced.

innodb_max_dirty_pages_pct=90

# How long an InnoDB transaction should wait for a lock to be granted before being rolled back.

# InnoDB automatically detects transaction deadlocks in its own lock tables and rolls back transactions.

# If you use the LOCK TABLES directive, or use a transaction-safe storage engine other than InnoDB within the same transaction

# Then a deadlock may occur and InnoDB cannot notice.

# In this case the timeout value is very helpful to solve this kind of problem.


innodb_lock_wait_timeout=120

[mysqldump]

# Do not cache the entire result in memory before writing it to disk.This is required when exporting very large tables

quick

max_allowed_packet=16M

[mysql]

no-auto-rehash

# Only key-value UPDATEs and DELETEs are allowed.

#safe-updates

[isamchk]

key_buffer=512M

sort_buffer_size=512M

read_buffer=8M

write_buffer=8M

[myisamchk]

key_buffer=512M

sort_buffer_size=512M

read_buffer=8M

write_buffer=8M

[mysqlhotcopy]

interactive-timeout

[mysqld_safe]

# Increase the number of open files per process.

# Warning: Make sure you've set the system-wide limit high enough!

# Opening a large number of tables requires setting this value high

open-files-limit=819

Tags

Technical otaku

Sought technology together

Related Topic

1 Comments

author

oral atorvastatin & lt;a href="https://lipiws.top/"& gt;atorvastatin without preion& lt;/a& gt; atorvastatin 20mg us

Bbfjqj

2024-03-09

Leave a Reply

+