MySQL二进制包安装简略过程
l 软件目录
[root@MASTER_03 ~]# mkdir -pv /data/software
[root@MASTER_03 ~]# cd /data/software/
[root@MASTER_03 mysql-5.6.28-linux-glibc2.5-x86_64]# tar xvf mysql-5.6.28-linux-glibc2.5-x86_64.tar.gz
l 软件下载
[root@MASTER_03 software]# wget http://120.198.244.50:9999/cdn.mysql.com//Downloads/MySQL-5.6/mysql-5.6.28-linux-glibc2.5-x86_64.tar.gz
l 安装过程
[root@MASTER_03 ~]# groupadd mysql
[root@MASTER_03 ~]# useradd -g mysql -d /usr/local/mysql -s /sbin/nologin mysql
[root@MASTER_03 data]# mkdir -pv /opt/app/mysql
[root@MASTER_03 ~]# chown -R mysql.mysql /usr/local/mysql/
[root@MASTER_03 data]# chown -R mysql.mysql /opt/app/mysql/
[root@MASTER_03 data]# mkdir -pv /data/3306/{tmp,logs,data}
[root@MASTER_03 ~]# chown -R mysql.mysql /data/mysql
[root@MASTER_03 ~]# cd /data/software/
[root@MASTER_03 ~]# mv mysql-5.6.28-linux-glibc2.5-x86_64/* /opt/app/mysql/
[root@MASTER_03 ~]# cd /opt/app/mysql/
[root@MASTER_03 mysql]# ./scripts/mysql_install_db --basedir=/opt/app/mysql --datadir=/data/3306/data --user=mysql
[root@MASTER_03 mysql]# cp support-files/mysql.server /etc/init.d/mysqld
[root@MASTER_03 mysql]# chmod +x /etc/init.d/mysqld
=============================my.cnf的配置=========================================================
[client]
port = 3306
socket = /data/3306/tmp/mysql.sock
# The MySQL server
[mysqld]
###base
explicit_defaults_for_timestamp=true
port = 3306
user = mysql
basedir = /opt/app/mysql
datadir = /data/3306/data
pid-file = /data/3306/tmp/mysql.pid
socket = /data/3306/tmp/mysql.sock
character_set_server = utf8
tmpdir = /dev/shm
server-id = 033306
skip_name_resolve = 1
skip_external_locking = 1
lower_case_table_names = 1
# logs
long_query_time = 1
slow_query_log = 1
slow_query_log_file = /data/3306/logs/slow.log
log_error = /data/3306/logs/error.log
# binlog
binlog_format = row
log_bin = /data/3306/logs/mysql-bin
binlog_cache_size = 8M
max_binlog_size = 1G
max_binlog_cache_size = 4G
expire_logs_days = 5
log_bin_trust_function_creators = 1
############ myisam
key_buffer_size = 64M
#bulk_insert_buffer_size = 32M
########## PGA
sort_buffer_size = 8M
read_buffer_size = 8M
join_buffer_size = 32M
read_rnd_buffer_size = 32M
query_cache_type = 0
query_cache_size = 0M
table_open_cache = 6144
table_definition_cache = 4096
open_files_limit = 65536
back_log = 512
max_connections = 1100
max_user_connections = 1000
max_connect_errors = 10000
max_allowed_packet = 128M
thread_cache_size = 64
thread_stack=192k
tmp_table_size=128M
max_heap_table_size=128M
# InnoDB
transaction_isolation = READ-COMMITTED
innodb_data_home_dir = /data/3306/data
innodb_log_group_home_dir = /data/3306/data
innodb_data_file_path = ibdata1:1G:autoextend
innodb_buffer_pool_size = 1G
innodb_buffer_pool_instances = 8
#innodb_additional_mem_pool_size = 16M
innodb_log_file_size = 1024M
innodb_log_buffer_size = 64M
innodb_log_files_in_group = 3
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 10
innodb_sync_spin_loops = 40
innodb_max_dirty_pages_pct = 80
innodb_thread_concurrency = 0
innodb_thread_sleep_delay = 500
innodb_concurrency_tickets = 1000
innodb_flush_method = O_DIRECT
innodb_file_per_table = 1
innodb_read_io_threads = 20
innodb_write_io_threads = 20
innodb_io_capacity = 600
innodb_file_format = Barracuda
innodb_purge_threads=1
innodb_purge_batch_size = 32
innodb_old_blocks_pct=50
innodb_stats_on_metadata=0
#
optimizer_switch='mrr=on,mrr_cost_based=off,batched_key_access=on'
# wait
#wait_timeout = 28800
#interactive_timeout = 120
#connect_timeout = 20
#slave-net-timeout = 30
[mysqldump]
quick
max_allowed_packet = 128M
#myisam_max_sort_file_size = 10G
[mysql]
no-auto-rehash
max_allowed_packet = 128M
default_character_set = utf8
[myisamchk]
key_buffer_size = 64M
sort_buffer_size = 512k
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
==================================/etc/init.d/mysqld中需要修改的2个地方=====================================
basedir=/opt/app/mysql
datadir=/data/3306/data
MySQL二进制包安装简略过程的更多相关文章
- MySQL二进制包安装及启动问题排查
环境部署:VMware10.0+CentOS6.9(64位)+MySQL5.7.19(64位)一.操作系统调整 # 更改时区 .先查看时区 [root@localhost ~]# date -R Tu ...
- MySQL二进制包安装
mysql的安装有多种方法,这里就介绍一下二进制包安装. [root@node1 ~]# tar xvf mysql-5.7.27-linux-glibc2.12-x86_64.tar [root@n ...
- mysql二进制包安装与配置实战记录
导读 一般中小型网站的开发都选择 MySQL 作为网站数据库,由于其社区版的性能卓越,搭配 PHP .Linux和 Apache 可组成良好的开发环境,经过多年的web技术发展,在业内被广泛使用的一种 ...
- ubuntu下mysql二进制包安装
1.下载对应二进制包 cd /usr/local/srcsudo wget http://dev.mysql.com/downloads/file/?id=465030 2.解压并放在/usr/loc ...
- mysql二进制包安装和遇到的问题
一.编译安装 tar -zxf mysql-5.5.32-linux2.6-x86_64.tar.gz mv mysql-5.5.32-linux2.6-x86_64 /application/mys ...
- 二进制包安装MySQL数据库
1.1二进制包安装MySQL数据库 1.1.1 安装前准备(规范) [root@Mysql_server ~]# mkdir -p /home/zhurui/tools ##创建指定工具包存放路径 [ ...
- shell安装MySQL二进制包
现在解压MySQL二进制包,稍作配置,就能用了,安装速度快,安装来练习最好不过了,哈哈 该脚本只是安装二进制的MySQL包,my.cnf只修改了简单的选项,没有过多进行设置,若朋友们用我的脚本安装作为 ...
- Mysql 通用二进制包安装
通用二进制包安装 注意:这里有严格的平台问题: 使用时:centos5.5版本 (类似Windows下的绿色包) 下载(mirrors.sohu.com/mysql) 直接使用tar 解压到指 ...
- liunx系统二进制包安装编译mysql数据库
liunx系统二进制包安装编译mysql数据库 # 解压二进制压缩包 [root@localhost ~]# tar xf mysql-5.5.32-linux2.6-x86_64.tar.gz -C ...
随机推荐
- JavaScript 事件循环及异步原理(完全指北)
引言 最近面试被问到,JS 既然是单线程的,为什么可以执行异步操作? 当时脑子蒙了,思维一直被困在 单线程 这个问题上,一直在思考单线程为什么可以额外运行任务,其实在我很早以前写的博客里面有写相关的内 ...
- linq-to-sql实现left join,group by,count
linq-to-sql实现left join,group by,count 用linq-to-sql实现下面的sql语句: SELECT p.ParentId, COUNT(c.ChildId) FR ...
- C++ Primer Plus的若干收获--(二)
哎,真是不想吐槽考驾照的艰辛历程了.跑到大西郊,顶着大太阳,一天就能摸上个十几分钟二十分钟的车,简直不要太坑爹,这两天真是做的我屁股疼的不行. .. 今天果断不去了.仅仅可惜我的大阿根廷啊,坚持到最后 ...
- android动画具体解释二 属性动画原理
property动画是一个强大的框架,它差点儿能使你动画不论什么东西. 你能够定义一个动画来改变对象的不论什么属性,不论其是否被绘制于屏幕之上. 一个属性动画在一定时间内多次改变一个属性(对象的一个字 ...
- 内核调试神器SystemTap — 探測点与语法(二)
a linux trace/probe tool. 官网:https://sourceware.org/systemtap/ 探測点 SystemTap脚本主要是由探測点和探測点处理函数组成的,来看下 ...
- 27. Remove Element【easy】
27. Remove Element[easy] Given an array and a value, remove all instances of that value in place and ...
- ubuntu16安装docker
首先确保curl已经安装! 然后执行: curl -sSL https://get.docker.com/|sudo sh 这个是通过脚本的方式安装docker. 运行命令测试 sudo docker ...
- mock调用返回值是void类型
//调用void方法 doNothing().when(templateWrapper).process();// doCallRealMethod().when(templateWrapper).p ...
- 在python中配置tornado服务
import tornado.httpserver import tornado.options import tornado.web from tornado.options import defi ...
- 模拟 Ajax 上传
----------------view----------------------------------- <form method="post" action=&quo ...