質問編集履歴
3
質問内容の変更
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,22 +1,18 @@
|
|
1
1
|
Mysql Cominity Server 5.7.11にてmy.cnfの設定をしています。
|
2
|
-
|
3
|
-
・validate_password=OFF
|
4
2
|
・max_connections = 500
|
5
3
|
・文字コード:UTF8
|
6
4
|
・DBファイルシステム領域について(1000M)自動作成をする
|
7
|
-
|
5
|
+
・log_timestamps = 'system'
|
6
|
+
・lower_case_table_names = 2
|
8
|
-
事をしたいと思います。my.cnfを下記のように設定し
|
7
|
+
事をしたいと思います。my.cnfを下記のように設定しました。
|
9
|
-
|
8
|
+
ログ時刻は現在の時刻になっているみたいなのですが、最初の1行だけ時刻がずれているのは
|
10
|
-
|
9
|
+
何故でしょうか?デーモンユーザで起動しているのでしょうか?
|
11
|
-
|
10
|
+
lower_case_table_names = 2にしてもmysqlに反映されません。記述が間違っているのでしょうか?
|
12
|
-
|
11
|
+
また、起動ログで注意、エラーが多い気がするのですが、問題ないでしょうか?
|
13
12
|
必要のない記述があれば教えて下さい。
|
14
|
-
|
15
|
-
========================my.cnf=================================
|
16
|
-
```
|
13
|
+
```my.cnf
|
17
14
|
# For advice on how to change settings please see
|
18
15
|
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
|
19
|
-
|
20
16
|
[mysqld]
|
21
17
|
#
|
22
18
|
# Remove leading # and set to the amount of RAM for the most important data
|
@@ -33,30 +29,23 @@
|
|
33
29
|
# join_buffer_size = 128M
|
34
30
|
# sort_buffer_size = 2M
|
35
31
|
# read_rnd_buffer_size = 2M
|
32
|
+
log_timestamps = 'system'
|
33
|
+
lower_case_table_names = 2
|
36
34
|
datadir=/var/lib/mysql
|
37
35
|
socket=/var/lib/mysql/mysql.sock
|
38
|
-
|
39
36
|
# Disabling symbolic-links is recommended to prevent assorted security risks
|
40
37
|
symbolic-links=0
|
41
|
-
|
42
|
-
|
43
38
|
character-set-server = utf8
|
44
39
|
skip-character-set-client-handshake
|
45
|
-
|
46
40
|
# --------------------------------------------------
|
47
41
|
# Network
|
48
42
|
# --------------------------------------------------
|
49
|
-
|
50
43
|
max_connections = 500
|
51
|
-
|
52
|
-
|
53
44
|
# --------------------------------------------------
|
54
45
|
# Logging
|
55
46
|
# --------------------------------------------------
|
56
|
-
|
57
47
|
general_log=1
|
58
48
|
general_log_file=/var/log/mysql_query.log
|
59
|
-
|
60
49
|
# --------------------------------------------------
|
61
50
|
# Cache & Memory
|
62
51
|
# --------------------------------------------------
|
@@ -72,7 +61,6 @@
|
|
72
61
|
read_buffer_size = 131072
|
73
62
|
join_buffer_size = 131072
|
74
63
|
read_rnd_buffer_size = 262144
|
75
|
-
|
76
64
|
# --------------------------------------------------------------------
|
77
65
|
# InnoDB behavior
|
78
66
|
# --------------------------------------------------------------------
|
@@ -89,7 +77,6 @@
|
|
89
77
|
innodb_autoinc_lock_mode = 1
|
90
78
|
innodb_change_buffering = inserts
|
91
79
|
innodb_old_blocks_time = 500
|
92
|
-
|
93
80
|
# --------------------------------------------------------------------
|
94
81
|
# InnoDB base
|
95
82
|
# --------------------------------------------------------------------
|
@@ -104,7 +91,7 @@
|
|
104
91
|
innodb_log_file_size = 64M
|
105
92
|
innodb_log_files_in_group = 2
|
106
93
|
innodb_log_buffer_size = 8M
|
107
|
-
innodb_additional_mem_pool_size = 8M
|
94
|
+
#innodb_additional_mem_pool_size = 8M
|
108
95
|
innodb_thread_concurrency = 8
|
109
96
|
innodb_flush_log_at_trx_commit = 1
|
110
97
|
innodb_force_recovery = 0
|
@@ -117,34 +104,64 @@
|
|
117
104
|
innodb_support_xa = FALSE
|
118
105
|
innodb_lock_wait_timeout = 50
|
119
106
|
innodb_table_locks = 1
|
120
|
-
|
121
|
-
|
122
107
|
[client]
|
123
108
|
default-character-set = utf8
|
124
|
-
|
125
109
|
[mysqldump]
|
126
110
|
default-character-set = utf8
|
127
|
-
|
128
111
|
[mysql]
|
129
112
|
default-character-set = utf8
|
130
|
-
|
131
113
|
[mysqld_safe]
|
132
|
-
|
133
114
|
log-error=/var/log/mysqld.log
|
134
115
|
pid-file=/var/run/mysqld/mysqld.pid
|
135
|
-
|
136
116
|
```
|
137
|
-
======================my.cnf==========================
|
138
|
-
|
139
|
-
-----------------
|
117
|
+
-----------------/var/log/mysqld.log-------------------
|
140
118
|
```ここに言語を入力
|
141
|
-
2016-03-
|
142
|
-
2016-03-
|
143
|
-
2016-03-
|
144
|
-
2016-03-
|
145
|
-
2016-03-
|
146
|
-
2016-03-
|
119
|
+
2016-03-08T08:54:41.930740Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
|
120
|
+
2016-03-08T17:54:42.139845+09:00 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
|
121
|
+
2016-03-08T17:54:42.140663+09:00 0 [Note] /usr/sbin/mysqld (mysqld 5.7.11-log) starting as process 21803 ...
|
122
|
+
2016-03-08T17:54:42.146232+09:00 0 [Warning] option 'innodb-autoextend-increment': unsigned value 67108864 adjusted to 1000
|
123
|
+
2016-03-08T17:54:42.146718+09:00 0 [Warning] InnoDB: Using innodb_support_xa is deprecated and the parameter may be removed in future releases. Only innodb_support_xa=ON is allowed.
|
124
|
+
2016-03-08T17:54:42.146740+09:00 0 [Warning] InnoDB: Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
125
|
+
2016-03-08T17:54:42.146833+09:00 0 [Note] InnoDB: PUNCH HOLE support available
|
126
|
+
2016-03-08T17:54:42.146867+09:00 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
|
127
|
+
2016-03-08T17:54:42.146880+09:00 0 [Note] InnoDB: Uses event mutexes
|
128
|
+
2016-03-08T17:54:42.146890+09:00 0 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
|
129
|
+
2016-03-08T17:54:42.146900+09:00 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
|
130
|
+
2016-03-08T17:54:42.146912+09:00 0 [Note] InnoDB: Using Linux native AIO
|
131
|
+
2016-03-08T17:54:42.147453+09:00 0 [Note] InnoDB: Number of pools: 1
|
132
|
+
2016-03-08T17:54:42.147610+09:00 0 [Note] InnoDB: Not using CPU crc32 instructions
|
133
|
+
2016-03-08T17:54:42.157075+09:00 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
|
134
|
+
2016-03-08T17:54:42.180181+09:00 0 [Note] InnoDB: Completed initialization of buffer pool
|
135
|
+
2016-03-08T17:54:42.184575+09:00 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
|
136
|
+
2016-03-08T17:54:42.197089+09:00 0 [Note] InnoDB: Highest supported file format is Barracuda.
|
137
|
+
2016-03-08T17:54:42.223241+09:00 0 [Note] InnoDB: Creating shared tablespace for temporary tables
|
138
|
+
2016-03-08T17:54:42.223353+09:00 0 [Note] InnoDB: Setting file '/var/lib/mysql/ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
|
139
|
+
2016-03-08T17:54:42.364921+09:00 0 [Note] InnoDB: File '/var/lib/mysql/ibtmp1' size is now 12 MB.
|
140
|
+
2016-03-08T17:54:42.366681+09:00 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
|
141
|
+
2016-03-08T17:54:42.366707+09:00 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
|
142
|
+
2016-03-08T17:54:42.368574+09:00 0 [Note] InnoDB: Waiting for purge to start
|
143
|
+
2016-03-08T17:54:42.418823+09:00 0 [Note] InnoDB: 5.7.11 started; log sequence number 1209999
|
144
|
+
2016-03-08T17:54:42.420939+09:00 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
|
145
|
+
2016-03-08T17:54:42.421367+09:00 0 [Note] Plugin 'FEDERATED' is disabled.
|
146
|
+
2016-03-08T17:54:42.421368+09:00 0 [Note] InnoDB: Buffer pool(s) load completed at 160308 17:54:42
|
147
|
+
2016-03-08T17:54:42.421969+09:00 0 [Warning] InnoDB: Cannot open table mysql/plugin from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue.
|
148
|
+
mysqld: Table 'mysql.plugin' doesn't exist
|
149
|
+
2016-03-08T17:54:42.422038+09:00 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
|
150
|
+
mysqld: File '/var/log/mysql_query.log' not found (Errcode: 13 - Permission denied)
|
151
|
+
2016-03-08T17:54:42.422293+09:00 0 [ERROR] Could not use /var/log/mysql_query.log for logging (error 13 - Permission denied). Turning logging off for the server process. To turn it on again: fix the cause, then either restart the query logging by using "SET GLOBAL GENERAL_LOG=ON" or restart the MySQL server.
|
152
|
+
2016-03-08T17:54:42.423054+09:00 0 [Warning] InnoDB: Cannot open table mysql/gtid_executed from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue.
|
153
|
+
mysqld: Table 'mysql.gtid_executed' doesn't exist
|
154
|
+
2016-03-08T17:54:42.423118+09:00 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
|
155
|
+
2016-03-08T17:54:42.423163+09:00 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
|
156
|
+
2016-03-08T17:54:42.423544+09:00 0 [Warning] CA certificate ca.pem is self signed.
|
157
|
+
2016-03-08T17:54:42.426320+09:00 0 [Note] Server hostname (bind-address): '*'; port: 3306
|
158
|
+
2016-03-08T17:54:42.427687+09:00 0 [Note] IPv6 is not available.
|
159
|
+
2016-03-08T17:54:42.427748+09:00 0 [Note] - '0.0.0.0' resolves to '0.0.0.0';
|
160
|
+
2016-03-08T17:54:42.427769+09:00 0 [Note] Server socket created on IP: '0.0.0.0'.
|
161
|
+
2016-03-08T17:54:42.431671+09:00 0 [Warning] InnoDB: Cannot open table mysql/server_cost from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue.
|
162
|
+
2016-03-08T17:54:42.431711+09:00 0 [Warning] Failed to open optimizer cost constant tables
|
147
163
|
|
164
|
+
2016-03-08T17:54:42.432742+09:00 0 [Warning] InnoDB: Cannot open table mysql/time_zone_leap_second from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue.
|
148
165
|
```
|
149
166
|
-----------mysqld.log----
|
150
167
|
|
2
質問内容を具体的に修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -6,40 +6,58 @@
|
|
6
6
|
・DBファイルシステム領域について(1000M)自動作成をする
|
7
7
|
|
8
8
|
事をしたいと思います。my.cnfを下記のように設定したのですが、サービスが開始になりません。
|
9
|
-
|
9
|
+
InnoDBの設定を外したら、サービス開始になりますが、InnoDbを使いたく思います。
|
10
10
|
|
11
|
-
また、
|
11
|
+
また、OS側の時刻/var/log/mysqld.logに出力した、時刻に大幅なずれがあるのはどこか設定が悪いのでしょうか?
|
12
|
-
できるのであれば、どこに入れればいいのでしょうか?
|
13
12
|
|
14
|
-
|
13
|
+
必要のない記述があれば教えて下さい。
|
15
14
|
|
16
15
|
========================my.cnf=================================
|
16
|
+
```ここに言語を入力
|
17
17
|
# For advice on how to change settings please see
|
18
18
|
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
|
19
19
|
|
20
|
+
[mysqld]
|
21
|
+
#
|
22
|
+
# Remove leading # and set to the amount of RAM for the most important data
|
23
|
+
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
|
24
|
+
# innodb_buffer_pool_size = 128M
|
25
|
+
#
|
26
|
+
# Remove leading # to turn on a very important data integrity option: logging
|
27
|
+
# changes to the binary log between backups.
|
28
|
+
# log_bin
|
29
|
+
#
|
30
|
+
# Remove leading # to set options mainly useful for reporting servers.
|
31
|
+
# The server defaults are faster for transactions and fast SELECTs.
|
32
|
+
# Adjust sizes as needed, experiment to find the optimal values.
|
33
|
+
# join_buffer_size = 128M
|
34
|
+
# sort_buffer_size = 2M
|
35
|
+
# read_rnd_buffer_size = 2M
|
36
|
+
datadir=/var/lib/mysql
|
37
|
+
socket=/var/lib/mysql/mysql.sock
|
20
38
|
|
21
|
-
[mysqld]
|
22
|
-
# --------------------------------------------------
|
23
|
-
# Base
|
24
|
-
# --------------------------------------------------
|
25
|
-
user = mysql
|
26
|
-
port = 3306
|
27
|
-
datadir = /var/lib/mysql
|
28
|
-
socket = /var/lib/mysql/mysql.sock
|
29
|
-
|
39
|
+
# Disabling symbolic-links is recommended to prevent assorted security risks
|
30
|
-
symbolic-links
|
40
|
+
symbolic-links=0
|
31
|
-
|
41
|
+
|
32
|
-
|
42
|
+
|
33
|
-
transaction-isolation = REPEATABLE-READ
|
34
43
|
character-set-server = utf8
|
35
|
-
collation-server = utf8_general_ci
|
36
44
|
skip-character-set-client-handshake
|
37
45
|
|
46
|
+
# --------------------------------------------------
|
47
|
+
# Network
|
48
|
+
# --------------------------------------------------
|
49
|
+
|
38
50
|
max_connections = 500
|
39
|
-
validate_password=OFF
|
40
51
|
|
41
|
-
|
52
|
+
|
42
53
|
# --------------------------------------------------
|
54
|
+
# Logging
|
55
|
+
# --------------------------------------------------
|
56
|
+
|
57
|
+
general_log=1
|
58
|
+
general_log_file=/var/log/mysql_query.log
|
59
|
+
|
60
|
+
# --------------------------------------------------
|
43
61
|
# Cache & Memory
|
44
62
|
# --------------------------------------------------
|
45
63
|
# Global
|
@@ -54,8 +72,7 @@
|
|
54
72
|
read_buffer_size = 131072
|
55
73
|
join_buffer_size = 131072
|
56
74
|
read_rnd_buffer_size = 262144
|
57
|
-
|
58
|
-
|
75
|
+
|
59
76
|
# --------------------------------------------------------------------
|
60
77
|
# InnoDB behavior
|
61
78
|
# --------------------------------------------------------------------
|
@@ -72,7 +89,7 @@
|
|
72
89
|
innodb_autoinc_lock_mode = 1
|
73
90
|
innodb_change_buffering = inserts
|
74
91
|
innodb_old_blocks_time = 500
|
75
|
-
|
92
|
+
|
76
93
|
# --------------------------------------------------------------------
|
77
94
|
# InnoDB base
|
78
95
|
# --------------------------------------------------------------------
|
@@ -100,24 +117,35 @@
|
|
100
117
|
innodb_support_xa = FALSE
|
101
118
|
innodb_lock_wait_timeout = 50
|
102
119
|
innodb_table_locks = 1
|
120
|
+
|
121
|
+
|
122
|
+
[client]
|
123
|
+
default-character-set = utf8
|
103
124
|
|
104
125
|
[mysqldump]
|
105
126
|
default-character-set = utf8
|
106
|
-
quick
|
107
|
-
max_allowed_packet = 16M
|
108
127
|
|
109
128
|
[mysql]
|
110
129
|
default-character-set = utf8
|
111
|
-
|
130
|
+
|
112
|
-
show-warnings
|
113
|
-
|
114
|
-
[client]
|
115
|
-
default-character-set = utf8
|
116
|
-
port = 3306
|
117
|
-
socket = /var/lib/mysql/mysql.sock
|
118
|
-
|
119
131
|
[mysqld_safe]
|
120
|
-
log-error = /var/log/mysql/error.log
|
121
|
-
==================================================================================
|
122
132
|
|
133
|
+
log-error=/var/log/mysqld.log
|
134
|
+
pid-file=/var/run/mysqld/mysqld.pid
|
135
|
+
|
136
|
+
```
|
137
|
+
======================my.cnf==========================
|
138
|
+
|
139
|
+
--------------------/var/log/mysqld.log-------------------
|
140
|
+
```ここに言語を入力
|
141
|
+
2016-03-07T06:16:14.583794Z 0 [Warning] option 'innodb-autoextend-increment': unsigned value 67108864 adjusted to 1000
|
142
|
+
2016-03-07T06:16:14.584335Z 0 [Warning] InnoDB: Using innodb_support_xa is deprecated and the parameter may be removed in future releases. Only innodb_support_xa=ON is allowed.
|
143
|
+
2016-03-07T06:16:14.584356Z 0 [Warning] InnoDB: Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
144
|
+
2016-03-07T06:16:17.142266Z 0 [Warning] InnoDB: New log files created, LSN=45790
|
145
|
+
2016-03-07T06:16:17.353250Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
|
146
|
+
2016-03-07T06:16:17.434115Z 0 [Warning] InnoDB: Cannot open table mysql/plugin from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue.
|
147
|
+
|
148
|
+
```
|
149
|
+
-----------mysqld.log----
|
150
|
+
|
123
151
|
以上、ご教授をお願い致します。
|
1
必要のない記述を教えて下さい。
title
CHANGED
File without changes
|
body
CHANGED
@@ -11,6 +11,8 @@
|
|
11
11
|
また、MysqlServerではコネクションプール(同時接続数は5まで)などの設定はできるのでしょうか?
|
12
12
|
できるのであれば、どこに入れればいいのでしょうか?
|
13
13
|
|
14
|
+
また、必要のない記述があれば教えて下さい。
|
15
|
+
|
14
16
|
========================my.cnf=================================
|
15
17
|
# For advice on how to change settings please see
|
16
18
|
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
|