九色国产,午夜在线视频,新黄色网址,九九色综合,天天做夜夜做久久做狠狠,天天躁夜夜躁狠狠躁2021a,久久不卡一区二区三区

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
安裝MYSQL5.6

最近公司某個項目要用mysql5.6版本,又要整理份安裝文檔。真心不愛寫安裝文檔類,貼于此。

1. 安裝必要的組件

1
2
# yum install –y autoconf automake imake libxml2-devel\
expat-devel cmake gcc gcc-c++ libaio libaio-devel bzr bison libtool ncurses5-devel

2. 下載解壓mysql軟件

1
2
3
4
5
# cd /usr/local/src
# wget -c http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.14-linux-glibc2.5-x86_64.tar.gz/from/http://cdn.mysql.com/ -O mysql-5.6.14-linux-glibc2.5-x86_64.tar.gz
# tar zxvf mysql-5.6.14-linux-glibc2.5-x86_64.tar.gz –C ../
# cd /usr/local/
# ln -s mysql-5.6.14-linux-glibc2.5-x86_64 mysql

3. 創(chuàng)建Mysql用戶組和用戶,及數據庫存放目錄:

1
2
3
4
5
6
7
# mkdir -p /data/mysql_data_3306
# mkdir -p /data/mysql_log
# mkdir -p /data/log-bin
# groupadd mysql
# useradd mysql -g mysql -M -s /sbin/nologin
# chown -R mysql.mysql /data/mysql_data_3306 /data/mysql_log /data/log-bin
# chown -R mysql.mysql /usr/local/mysql-5.6.14-linux-glibc2.5-x86_64

4. 配置文件(依具體環(huán)境)

# vi /etc/my.cnf

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
[mysqld]
# GENERAL #
user = mysql
default-storage-engine = InnoDB
socket = /data/mysql_data_3306/mysql.sock
pid-file = /data/mysql_data_3306/mysql.pid
port = 3306
# MyISAM #
key_buffer_size = 1344M
myisam_recover = FORCE,BACKUP
# SAFETY #
max_allowed_packet = 16M
max_connect_errors = 1000000
skip_name_resolve
# DATA STORAGE #
datadir = /data/mysql_data_3306/
long_query_time = 1
# BINARY LOGGING #
log-bin = /data/log-bin/mysql-bin-3306
expire-logs-days = 14
sync-binlog = 1
server-id = 1
max_binlog_size = 500M
# REPLICATION #
relay-log = /data/log-bin/relay-bin-3306
slave-net-timeout = 60
# CACHES AND LIMITS #
tmp_table_size = 32M
max_heap_table_size = 32M
max_connections = 500
thread_cache_size = 50
open_files_limit = 65535
table_definition_cache = 4096
table_open_cache = 4096
# INNODB #
innodb_data_file_path = ibdata1:128M;ibdata2:10M:autoextend
innodb_flush_method = O_DIRECT
innodb_log_files_in_group = 2
innodb_lock_wait_timeout = 50
innodb_log_file_size = 256M
innodb_flush_log_at_trx_commit = 1
innodb_file_per_table = 1
innodb_thread_concurrency = 8
innodb_buffer_pool_size = 8G
# LOGGING #
log-error = /data/mysql_log/mysql-error-3306.log
log-queries-not-using-indexes = 1
slow-query-log = 1
long_query_time = 1
slow-query-log-file = /data/mysql_log/mysql-slow-3306.log
# FOR SLAVE #
#binlog-format = ROW
#log-slave-updates = true
#gtid-mode = on
#enforce-gtid-consistency = true
#master-info-repository = TABLE
#relay-log-info-repository = TABLE
#sync-master-info = 1
#slave-parallel-workers = 2
#binlog-checksum = CRC32
#master-verify-checksum = 1
#slave-sql-verify-checksum = 1
#binlog-rows-query-log_events = 1
#report-port = 3306
#report-host = 10.1.1.10

5. 系統(tǒng)服務

1
2
3
4
5
6
7
8
9
10
# cp -af /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld_3306
# vi /etc/init.d/mysqld_3306
修改兩處位置:
basedir=/usr/local/mysql
datadir=/data/mysql_data_3306
執(zhí)行如下命令
# chmod 755 /etc/init.d/mysqld_3306
# chkconfig --add mysqld_3306
# chkconfig --level 345 mysqld_3306 on

 

6. 初始化數據庫

1
2
# cd /usr/local/mysql
# ./scripts/mysql_install_db --user=mysql --defaults-file=/etc/my.cnf

7. 啟動數據庫進程

1
# service mysqld_3306 start

8. 修改root密碼

1
2
3
4
# /usr/local/mysql/bin/mysql -p -uroot -S /tmp/mysql.sock #這里直接回車就能進入數據庫系統(tǒng)
Mysql> delete from mysql.user where user='';
Mysql> update mysql.user set password=PASSWORD(‘xxxxxxxx’) where user='root';
Mysql>flush privileges;

 

本站僅提供存儲服務,所有內容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權內容,請點擊舉報
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
生產環(huán)境中l(wèi)inux下的mysql安裝
MySQL8.0.19安裝
Linux mysql5.7.20 二進制文件安裝
MySQL雙機熱備+heartbeat集群+自動故障轉移(2秒) - Linux高級應用 ...
Centos 安裝筆記(6) mysql編譯安裝及數據庫配置
Linux下二進制包安裝mysql
更多類似文章 >>
生活服務
熱點新聞
分享 收藏 導長圖 關注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服