mysql5.5.60二进制安装

系统centos6.8
安装过程如下

mkdir -p /home/mysql3307/{data,log,binlog,tmp}
useradd mysql -S /sbin/nologin -M
chown -R mysql.mysql  /home/mysql3307/{data,log,binlog,tmp}
wget http://ftp.kaist.ac.kr/mysql/Downloads/MySQL-5.5/mysql-5.5.60-linux-glibc2.12-x86_64.tar.gz
tar xf mysql-5.5.60-linux-glibc2.12-x86_64.tar.gz -C /usr/local
mv /usr/local/mysql-5.5.60-linux-glibc2.12-x86_64 /usr/local/mysql5.5
 ./mysql_install_db --datadir=/home/mysql3307/data --basedir=/usr/local/mysql5.5 --user=mysql --defaults-file=/home/mysql3307/my3307.cnf
cd /usr/local/mysql5.5/bin/
 ./mysqld_safe --defaults-file=/home/mysql3307/my3307.cnf  &
./mysqladmin -uroot password ‘testykJ(517‘ -S  /tmp/mysql3307.sock -P3307

my.cnf的配置文件内容如下:
配置文件如下:

[root@127 ~]# cat /home/mysql3307/my3307.cnf
[mysqld]
back_log = 2000
basedir = /usr/local/mysql5.5
binlog-format = row
character_set_server = utf8
datadir = /home/mysql3307/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 = /home/mysql3307/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 = /home/mysql3307/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 = /home/mysql3307/binlog/mysql-bin
log_bin_trust_function_creators = 1
log_output = FILE
long_query_time = 1
log-error = /home/mysql3307/log/error.log
max_allowed_packet = 134217728
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 = /home/mysql3307/mysqld.pid
port = 3307
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 = /home/mysql3307/log/mysql-relay.log
secure-file-priv = /home/mysql3307/tmp
server-id = 2331053307
skip-slave-start
skip_name_resolve
slave-load-tmpdir = /home/mysql3307/tmp
slow-query-log-file = /home/mysql3307/log/mysql-slow.log
slow_query_log = 1
socket = /tmp/mysql3307.sock
sort_buffer_size = 2097152
table_open_cache = 128
thread_cache_size = 50
tmpdir = /home/mysql3307/tmp
user = mysql
wait_timeout = 2880000
transaction_isolation=read-committed
long_query_time=1
sync_binlog=0
innodb_flush_log_at_trx_commit=0

###指定数据库同步
replicate_wild_do_table=test01.%
replicate_wild_ignore_table=information_schema.%
replicate_wild_ignore_table=performance_schema.%
replicate_wild_ignore_table=mysql.%
replicate_wild_ignore_table=test.%

[mysqld_safe]
log-error = /home/mysql3307/log/error.log
pid-file = /home/mysql3307/mysqld.pid

说明:记录在此处方便自己工作中快速查阅,同时也希望能帮助到需要此文档的同学们

原文地址:https://blog.51cto.com/wujianwei/2356098

时间: 2024-10-08 17:45:52

mysql5.5.60二进制安装的相关文章

mysql5.6 通用二进制安装

mysql5.6 通用二进制安装: #卸载原有的mysqlyum remove mysql*ls /etc/my.cnf*mv /etc/my.cnf* /tmp/ #安装依赖包yum install make cmake gcc gcc-c++ bison-devel ncurses-devel autoconf automake -y #添加用户groupadd mysqluseradd -r -g mysql mysql#useradd -M -s /sbin/nologin mysql

mysql5.6.20二进制安装部署文档

一.业务需求: 单台服务器线上运行着mysql5.5.48 现在是不影响线上的业务,不停止线上的mysql5.5数据库来部署另外一个mysql5.6.20的实例 二.安装部署过程: 2.1安装部署过程注意事项: 在初始化mysql数据库时,是会寻找my.cnf配置文件的,是有顺序的,默认的顺序是: [[email protected] ~]# mysql --help | grep 'Default options' -A 1 Default options are read from the

mysql-5.7.20 二进制安装 | 备份恢复

###### 二进制自动安装数据库脚本root密码123456将脚本和安装包放在/usr/local/src目录即可############### ######数据库目录/usr/local/mysql############ ######数据目录/data/mysql############ ######慢日志目录/data/slowlog############ ######端口号默认3306其余参数按需自行修改############ #!/bin/bash cd /usr/local/s

mysql-5.6.x和mysql-5.7.x二进制安装

#!/bin/bash #__Author__:Allen_Jol at 2018-03-21 13:52:13 #Description: install mysql-5.6.39 or mysql-5.7.21 binary for centos 6.x CPUINFO=`cat /proc/cpuinfo | grep -c  processor` DIR="/usr/local/src" MDIR="/usr/local/mysql" DATADIR=&qu

Centos7 MYSQL5.6.42二进制安装

1. 下载二进制mysql的安装包 [root@minion-1 ~]#wget http://mirrors.sohu.com/mysql/MySQL-5.6/mysql-5.6.42-linux-glibc2.12-x86_64.tar.gz 2. 新建一个专放软件的目录 [root@minion-1 ~]#mkdir -p /services/current_apps 3. 解压包到放软件的目录下 [root@minion-1 ~]# tar -xzf mysql-5.6.42-linux

mysql-5.7.21 二进制安装 | Jemalloc内存优化 | 备份恢复|修改密码

简介 ######数据库目录/usr/local/mysql############ ######数据目录/data/mysql############ ######慢日志目录/data/slowlog############ ######端口号默认3306其余参数按需自行修改############ 安装脚本 #!/bin/bash cd /usr/local/src/ if [ ! -f mysql-5.7.21-linux-glibc2.12-x86_64.tar.gz ]; then w

Centos7 Mysql5.7.27二进制安装

步骤一:下载安装包,打开Mysql官网,找到对应的 下载路径如下:https://downloads.mysql.com/archives/community/ wget https://downloads.mysql.com/archives/get/file/mysql-5.7.27-linux-glibc2.12-x86_64.tar.gz -O /usr/local/src/mysql-5.7.27-linux-glibc2.12-x86_64.tar.gz 步骤二:下载依赖包,Cent

mysql5.6.20二进制安装

1把105的/usr/local/mysql拷过去 2. 把105的/etc/my.cnf拷过去 3. mkdir /data/mysql/{data,tmp,binlog,log}-p 4. 初始化 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

mysql5.7.22二进制安装

系统版本:centos6.5 内核:2.6第一步初始化: ./bin/mysqld --initialize --user=mysql --datadir=数据存放路径 --basedir=安装包路径第二步./bin/mysql_ssl_rsa_setup --datadir=数据存放路径第三部:./bin/mysqld --defaults-file=配置文件路径 --user=root第四步:(修改密码)set password = password('tongda666'); 注意:路径=