In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Copy the 105s / usr/local/mysql.
two。 Copy the 105s / etc/my.cnf.
3. Mkdir / data/mysql/ {data,tmp,binlog,log}-p
4. Initialization
Rpm-qa mysql
Yum remove mysql-5.1.73-8.el6_8.x86_64
/ etc/my.cnf / etc/my.cnf.bak
Yum install libaio*
Useradd mysql
Mkdir / data/mysql/ {data,tmp,binlog,log}-p
Chown-R mysql.mysql / data/mysql
Tar xf/tmp/mysql-5.6.20-linux-glibc2.5-x86_64.tar.gz-C / usr/local/
Cd / usr/local/
Mv mysql-5.6.20-linux-glibc2.5-x86_64 mysql
Chown-R mysql.mysql / usr/local/mysql
Cd / usr/local/mysql/scripts
. / mysql_install_db-- datadir=/data/mysql/data--basedir=/usr/local/mysql-- user=mysql-- explicit_defaults_for_timestamp
Echo "/ usr/local/mysql/lib" > / etc/ld.so.conf.d/mysql.conf & & ldconfig-v
Ln-s / usr/local/mysql/include / usr/include/mysql
Cp / usr/local/mysql/support-files/mysql.server/etc/init.d/mysqld
Chkconfig mysqld on
Echo "exportPATH=$PATH:/usr/local/mysql/bin" > / etc/profile.d/mysql.sh
Source / etc/profile
/ etc/init.d/mysqld restart
Ps-ef | grep mysql
Mysqladmin-uroot password 'Z2323445'-S / data/mysql/mysqld.sock
Mysql-uroot-p-S / data/mysql/mysqld.sock
Preliminary optimization of mysql:
Drop database test;drop user root@'::1';drop user''@'localhost';drop user''@' localhost.localdomain';drop user' root'@'localhost.localdomain';select user,host from mysql.user; flush privileges
And add Sky Rabbit lepus to monitor mysql
Grant insert,update,delete,create,select,super,process,reload,showdatabases,replication client on *. * to'lepus_monitor'@'221.203.45.78' identified by 'LepUs@zy@MoniTOR'; flush privileges
Mysql5.6.20 my.cnf profile
The server environment is a dellr710 server, and the memory: 60GB CPU is hyperthreaded.
[mysqld]
Back_log = 2000
Basedir = / usr/local/mysql
Binlog-format = MIXED
Character_set_server = utf8
Datadir = / data/mysql/data
Event_scheduler = ON
Expire_logs_days = 1
Innodb_autoinc_lock_mode = 1
Innodb_buffer_pool_size = 1073741824
Innodb_data_file_path = ibdata1:500M:autoextend
Innodb_data_home_dir = / data/mysql/data
Innodb_file_per_table = 1
Innodb_flush_log_at_trx_commit = 2
Innodb_flush_method = O_DIRECT
Innodb_io_capacity = 2000
Innodb_log_buffer_size = 8388608
Innodb_log_files_in_group = 3
Innodb_log_group_home_dir = / data/mysql/data
Innodb_max_dirty_pages_pct = 50
Innodb_open_files = 1024
Innodb_read_io_threads = 8
Innodb_thread_concurrency = 20
Innodb_write_io_threads = 8
Innodb_lock_wait_timeout = 10
Innodb_buffer_pool_load_at_startup = 1
Innodb_buffer_pool_dump_at_shutdown = 1
Key_buffer_size = 3221225472
Innodb_log_file_size = 1G
Local_infile = 1
Log-bin = / data/mysql/binlog/mysql-bin.log
Log_bin_trust_function_creators = 1
Log_output = FILE
Long_query_time = 1
Log-error = / data/mysql/log/error.log
Max_allowed_packet = 33554432
Max_connect_errors = 1000000
Max_connections = 2000
Myisam_sort_buffer_size = 33554432
Myisam_recover = 1
Join_buffer_size = 8388608
Tmp_table_size = 33554432
Net_buffer_length = 8192
Performance_schema = 1
Performance_schema_max_table_instances = 200
Pid-file = / data/mysql/mysqld.pid
Port = 3306
Query_cache_size = 0
Query_cache_type = 0
Read_buffer_size = 20971520
Read_rnd_buffer_size = 16m
Max_heap_table_size = 33554432
Bulk_insert_buffer_size = 134217728
# relay-log = / data/mysql/log/mysql-relay.log
Secure-file-priv = / data/mysql/tmp
Server-id = 1131053306
Skip-slave-start
Skip_name_resolve
Slave-load-tmpdir = / data/mysql/tmp
Slow-query-log-file = / data/mysql/log/mysql-slow.log
Slow_query_log = 1
Socket = / data/mysql/mysqld.sock
Sort_buffer_size = 2097152
Sync_binlog = 1
Table_open_cache = 128,
Thread_cache_size = 50
Tmpdir = / data/mysql/tmp
User = mysql
Wait_timeout = 120
Transaction_isolation=read-committed
Long_query_time=1
Sync_binlog=0
Innodb_flush_log_at_trx_commit=0
[mysqld_safe]
Log-error = / data/mysql/log/error.log
Pid-file = / data/mysql/mysqld.pid
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: 293
*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
Change PDB size SQL > show pdbsCON_ID CON_NAME OPEN MODE RESTRICTED 2 PDB$SEED READ
© 2024 shulou.com SLNews company. All rights reserved.