-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmysqlSettingsMigrations.sh
88 lines (75 loc) · 2.61 KB
/
mysqlSettingsMigrations.sh
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
##################################################
# /etc/mysql/mariadb.conf.d/50-server.cnf
# bind-address = 127.0.0.1
mysql -u root -p -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '********' WITH GRANT OPTION;"
##################################################
# /etc/mysql/mariadb.conf.d/50-server.cnf
# [mysqld]
# innodb_read_io_threads = 4
# innodb_write_io_threads = 4
# connect_timeout = 31536000
# interactive_timeout = 31536000
# tmp_table_size = 18446744073709551615
# max_heap_table_size = 18446744073709551615
# innodb_buffer_pool_size = 4294967295
# innodb_data_file_path = ibdata1:12M:autoextend
# join_buffer_size = 4294967295
##################################################
# SHOW VARIABLES like 'innodb_read_io_threads';
# SHOW VARIABLES like 'innodb_write_io_threads';
# SHOW VARIABLES like 'connect_timeout';
# SHOW VARIABLES like 'interactive_timeout';
# SHOW VARIABLES like 'tmp_table_size';
# SHOW VARIABLES like 'max_heap_table_size';
# SHOW VARIABLES like 'innodb_buffer_pool_size';
# SHOW VARIABLES like 'innodb_data_file_path';
# SHOW PROCESSLIST;
##################################################
mkdir /mnt/sd/b/mysql/
rsync -av /var/lib/mysql /mnt/sd/b
# /etc/mysql/mariadb.conf.d/50-server.cnf
# datadir = /mnt/sd/b/mysql
systemctl restart mysql
##################################################
nohup mysql --user=root --database=cautolog --password=******** < /mnt/sd/b/tecdoc2017q2/tecdoc.sql &
ps aux
##################################################
# /etc/mysql/mariadb.conf.d/50-server.cnf
# [server]
# [mysqld]
# user = mysql
# pid-file = /var/run/mysqld/mysqld.pid
# socket = /var/run/mysqld/mysqld.sock
# port = 3306
# basedir = /usr
# datadir = /mnt/sd/b/mysql
# tmpdir = /tmp
# lc-messages-dir = /usr/share/mysql
# skip-external-locking
# bind-address = 127.0.0.1
# innodb_read_io_threads = 4
# innodb_write_io_threads = 4
# connect_timeout = 31536000
# interactive_timeout = 31536000
# tmp_table_size = 18446744073709551615
# max_heap_table_size = 18446744073709551615
# innodb_buffer_pool_size = 4294967295
# innodb_data_file_path = ibdata1:12M:autoextend
# join_buffer_size = 4294967295
# key_buffer_size = 16M
# max_allowed_packet = 16M
# thread_stack = 192K
# thread_cache_size = 8
# myisam_recover_options = BACKUP
# query_cache_limit = 1M
# query_cache_size = 16M
# log_error = /var/log/mysql/error.log
# expire_logs_days = 10
# max_binlog_size = 100M
# character-set-server = utf8mb4
# collation-server = utf8mb4_general_ci
# innodb_file_per_table = 1
# [embedded]
# [mariadb]
# [mariadb-10.1]
##################################################