介绍
这篇文章给大家介绍如何进行MySQL5.6二进制部署,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。
下载mysql并检查MD5
[root@hadoop-01 ~] #, cd /usr/当地 [root@hadoop-01 地方]#,wget https://downloads.mariadb.com/archives/mysql - 5.6/- mysql - 5.6.23 - linux - glibc2.5 x86_64.tar.gz [root@hadoop-01 地方]#,wget https://downloads.mariadb.com/archives/mysql - 5.6/- mysql - 5.6.23 - linux - glibc2.5 x86_64.tar.gz.md5 [root@hadoop-01 地方]#,vi mysql-5.6.23-linux-glibc2.5-x86_64.tar.gz.md5 61 affe944eff55fcf51b31e67f25dc10 mysql-5.6.23-linux-glibc2.5-x86_64.tar.gz [root@hadoop-01 地方]#,md5sum mysql-5.6.23-linux-glibc2.5-x86_64.tar.gz 61 affe944eff55fcf51b31e67f25dc10 , mysql-5.6.23-linux-glibc2.5-x86_64.tar.gz
检查是否已安装
[root@hadoop-01 地方]#,ps ef | grep mysqld
解压重命名
[root@hadoop-01 地方]#,tar xzvf mysql-5.6.23-linux-glibc2.5-x86_64.tar.gz [root@hadoop-01 地方]#,mv mysql-5.6.23-linux-glibc2.5-x86_64 mysql
创建用户组
[root@hadoop-01 地方]#,groupadd -g 101年,dba [root@hadoop-01 地方]#,useradd -u 514年,-g dba -g root -d /usr/地方/mysql mysqladmin [root@hadoop-01 地方]#,id mysqladmin uid=514 (mysqladmin), gid=101 (dba),组=101 (dba), 0(根) [root@hadoop-01 地方]#,passwd mysqladmin
复制环境变量配置文件至mysqladmin用户的家庭目录中,为了以下步骤配置个人环境变量
[root@hadoop-01 地方]#,cp /etc/skel/. *,/usr/地方/mysql 创建配置文件,(640)/etc/my . cnf中所做 (root@hadoop-01 mysql) #,。vi /etc/my . cnf中所做 删除内容,并将以下内容复制进去 (客户端) port ,,,,,,,,,,=, 3306 socket ,,,,,,,,,=,/usr/地方/mysql/数据/mysql.sock (mysqld) port ,,,,,,,,,,=, 3306 socket ,,,,,,,,,=,/usr/地方/mysql/数据/mysql.sock skip-external-locking key_buffer_size =256 sort_buffer_size =2 m read_buffer_size =2 m read_rnd_buffer_size =, 4 m query_cache_size=32米 max_allowed_packet =16米 myisam_sort_buffer_size=128 tmp_table_size=32 m table_open_cache =512 thread_cache_size =8 wait_timeout =86400 interactive_timeout =86400 max_connections =600 #,Try number  of cpu # 39; s * 2, for thread_concurrency thread_concurrency =32 # isolation level 以及default engine default-storage-engine =INNODB transaction-isolation =读取提交 server-id =, 1 basedir ,,,,=/usr/地方/mysql datadir ,,,,=,/usr/地方/mysql/数据 pid-file ,,,,=,/usr/地方/mysql/数据/hostname.pid # open performance 模式 log-warnings sysdate-is-now binlog_format =,喜忧参半 log_bin_trust_function_creators=1 log-error ,=,/usr/地方/mysql/数据/hostname.err log-bin=/usr/地方/mysql/arch/mysql-bin # other 日志 # general_log =1 # general_log_file ,=,/usr/地方/mysql/数据/general_log.err # slow_query_log=1 # slow_query_log_file=/usr/地方/mysql/数据/slow_log.err # for replication 奴隶 # log-slave-updates # sync_binlog =1 # for innodb options 时间=innodb_data_home_dir /usr/地方/mysql/数据/时间=innodb_data_file_path ibdata1:500M: autoextend 时间=innodb_log_group_home_dir /usr/地方/mysql/拱门 时间=innodb_log_files_in_group 2 innodb_log_file_size =200 #,rember 改变 innodb_buffer_pool_size =2048 innodb_additional_mem_pool_size =50米 innodb_log_buffer_size =16米 innodb_lock_wait_timeout =100 # innodb_thread_concurrency =0 innodb_flush_log_at_trx_commit =1 innodb_locks_unsafe_for_binlog=1 # innodb io 特点:add for mysql5.5.8 performance_schema innodb_read_io_threads=4 innodb-write-io-threads=4 innodb-io-capacity=200 # purge threads change 违约(0),用1,for 清洗 innodb_purge_threads=1 innodb_use_native_aio=对 # case-sensitive file names 以及separate 表空间 innodb_file_per_table =1 lower_case_table_names=1 (,mysqldump) 快速 max_allowed_packet =16米 (mysql) no-auto-rehash (mysqlhotcopy) interactive-timeout (myisamchk) key_buffer_size =256 sort_buffer_size =256 read_buffer =2 m write_buffer =, 2 m如何进行MySQL5.6二进制部署