创建软件安装目录
mkdir /
Mysql_software_55
下载软件
Percona官网的下载页面有两个二进制Tar包,分别对应不同的发行版本
ssl100 - Debian/
ubuntu
ssl101 - for
Centos 6 and CentOS 7
解压安装包
tar xvfz Percona-Server-5.5.58-rel38.10-
linux.x86_64.ssl101.tar.gz -C /
mysql_software_55/
创建my
sql用户
useradd mysql
创建数据目录、
日志目录和临时目录
mkdir -p /mysql_55_3306/data
mkdir -p /mysql_55_3306/log
mkdir -p /mysql_55_3306/tmp
创建错误日志
touch /mysql_55_3306/log/error.log
chown -R mysql.mysql /mysql_55_3306
编辑配置文件
vim /etc/my_55_3306.cn
-
[client]
port = 3306
Socket = /mysql_55_3306/tmp/mysql.sock
# The MySQL Server
#######BasiC#######
[mysqld]
server-id = 101
port = 3306
user = mysql
basedir = /mysql_software_55/
datadir = /mysql_55_3306/data
tmpdir = /mysql_55_3306/tmp
socket = /mysql_55_3306/tmp/mysql.sock
skip-external-locking
skip-name-resolve
default-storage-engine = INNODB
character-set-server = utf8
wait_timeout = 100
connect_timeout = 20
interactive_timeout = 100
back_log = 500
myisam_recover
event_scheduler = ON
#######binlog#######
log-bin = /mysql_55_3306/log/mysql-bin
binlog_fORMat = row
max_binlog_size = 128M
binlog_cache_size = 2M
expire-logs-days = 5
#######replication#######
slave-net-timeout = 10
#rpl_semi_sync_master_enabled =1
#rpl_semi_sync_master_wait_no_slave = 1
#rpl_semi_sync_master_timeout = 1000
#rpl_semi_sync_slave_enabled = 1
skip-slave-start
log_slave_update = 1
relay_log_recovery = 1
#######slow log#######
slow_query_log = 0
slow_query_log_file = /mysql_55_3306/log/mysql_slow.log
long_query_time = 2
#######error log#######
log-error = /mysql_55_3306/log/error.log
general_log = 0
general_log_file = /mysql_55_3306/log/general_query.log
#######per_thread_buffers########
max_connections = 1024
max_user_connections = 1000
max_connect_errors = 10000
key_buffer_size = 10M
max_allowed_packet = 128M
table_cache = 3096
table_open_cache = 6144
table_definition_cache = 4096
sort_buffer_size = 512K
read_buffer_size = 512K
read_rnd_buffer_size = 512K
join_buffer_size = 512K
tmp_table_size = 64M
max_heap_table_size = 64M
query_cache_type = 0
query_cache_size = 0
bulk_insert_buffer_size = 32M
thread_cache_size = 64
thread_concurrency = 32
thread_stack = 256K
#######InnoDB#######
innodb_data_home_dir = /mysql_55_3306/data
innodb_log_group_home_dir = /mysql_55_3306/log
innodb_data_file_path = ibdata1:2G:autoextend
innodb_buffer_pool_size = 128M
innodb_buffer_pool_instances = 1
innodb_additional_mem_pool_size = 2M
innodb_log_file_size = 512M
innodb_log_buffer_size = 10M
innodb_log_files_in_group = 3
innodb_flush_log_at_trx_commit = 2
innodb_lock_wait_timeout = 10
innodb_sync_spin_loops = 40
innodb_max_dirty_pages_pct = 90
innodb_support_xa = 1
innodb_thread_concurrency = 0
innodb_thread_sleep_delay = 500
innodb_file_io_threads = 4
innodb_concurrency_tickets = 1000
log_bin_trust_function_creators = 1
innodb_flush_method = O_DIRECT
innodb_file_per_table
innodb_read_io_threads = 16
innodb_write_io_threads = 16
innodb_io_capacity = 2000
innodb_file_format = Barracuda
innodb_purge_threads = 1
innodb_purge_batch_size = 32
innodb_old_blocks_pct = 75
innodb_change_buffering = all
transaction_isolation = READ-COMMITTED
--结束END--
本文标题: Percona MySQL 5.5 Linux通用二进制包安装(CentOS 6.9)
本文链接: https://lsjlt.com/news/48727.html(转载时请注明来源链接)
有问题或投稿请发送至:
邮箱/279061341@qq.com QQ/279061341
0