In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "the basic configuration of MySQL". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Query_cache_size, tmp_table_size these two options must be set!
# The following options will be passed to all MySQL clients
[client]
# password = your_password
Port = 3306
Socket = / home/work//tmp/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
Port = 3306
Bind-address = 127.0.0.1
Socket = / home/work/mysql/tmp/mysql.sock
# skip-locking
Max_allowed_packet = 1m
Table_open_cache = 16
Sort_buffer_size = 8m
Read_buffer_size = 512K
Read_rnd_buffer_size = 256K
Net_buffer_length = 8K
Thread_stack = 128K
# Size of the Key Buffer, used to cache index blocks for MyISAM tables.
# Do not set it larger than 30% of your available memory, as some memory
# is also required by the OS to cache rows. Even if you're not using
# MyISAM tables, you should still set it to 8-64m as it will also be
# used for internal temporary disk tables.
Key_buffer_size = 8m
# If the temporary file used for fast index creation would be bigger
# than using the key cache by the amount specified here, then prefer the
# key cache method. This is mainly used to force long character keys in
# large tables to use the slower key cache method to create the index.
Myisam_sort_buffer_size = 8m
# Query cache is used to cache SELECT results and later return them
# without actual executing the same query once again. Having the query
# cache enabled may result in significant speed improvements, if your
# have a lot of identical queries and rarely changing tables. See the
# "Qcache_lowmem_prunes" status variable to check if the current value
# is high enough for your load.
# Note: In case your tables change very often or if your queries are
# textually different every time, the query cache may result in a
# slowdown instead of a performance improvement.
Query_cache_size=16M
# Maximum size for internal (in-memory) temporary tables. If a table
# grows larger than this value, it is automatically converted to disk
# based table This limitation is for a single table. There can be many
# of them.
Tmp_table_size=16M
# Don't listen on a TCP/IP port at all. This can be a security enhancement
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (using the "enable-named-pipe" option) will render mysqld useless!
#
Skip-networking
Server-id = 1
# Uncomment the following if you want to log updates
# log-bin=mysql-bin
# binary logging format-mixed recommended
# binlog_format=mixed
# Uncomment the following if you are using InnoDB tables
# default_storage_engine=InnoDB
Innodb_data_home_dir = / home/work/mysql/var/
Innodb_data_file_path = ibdata1:10M:autoextend
Innodb_log_group_home_dir = / home/work/mysql/var/
# You can set.. _ buffer_pool_size up to 50-80%
# of RAM but beware of setting memory usage too high
Innodb_buffer_pool_size = 32m
Innodb_additional_mem_pool_size = 4m
# Set.. _ log_file_size to 25% of buffer pool size
Innodb_log_file_size = 10m
Innodb_log_buffer_size = 16m
Innodb_flush_log_at_trx_commit = 1
Innodb_lock_wait_timeout = 50
[mysqldump]
Quick
Max_allowed_packet = 16m
[mysql]
No-auto-rehash
# Remove the next comment character if you are not familiar with SQL
# safe-updates
[myisamchk]
Key_buffer_size = 8m
Sort_buffer_size = 8m
[mysqlhotcopy]
Interactive-timeout
This is the end of the content of "basic configuration of MySQL". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.