質問編集履歴

1

追記

2021/09/30 04:48

投稿

ryo-dev
ryo-dev

スコア437

test CHANGED
File without changes
test CHANGED
@@ -89,3 +89,283 @@
89
89
 
90
90
 
91
91
  この状態でSSHのアクセスは出来ているので問題は無いと思います…
92
+
93
+
94
+
95
+ ### 追記
96
+
97
+ /etc/mysql/mariadb.conf.d/50-server.cnf に設定ファイルらしきものを発見して、回答いただいた記述を追加しました。
98
+
99
+ bind-address = 127.0.0.1は元々あったのでその下に一行追加した感じです。
100
+
101
+ ```file
102
+
103
+ #
104
+
105
+ # These groups are read by MariaDB server.
106
+
107
+ # Use it for options that only the server (but not clients) should see
108
+
109
+ #
110
+
111
+ # See the examples of server my.cnf files in /usr/share/mysql
112
+
113
+
114
+
115
+ # this is read by the standalone daemon and embedded servers
116
+
117
+ [server]
118
+
119
+
120
+
121
+ # this is only for the mysqld standalone daemon
122
+
123
+ [mysqld]
124
+
125
+
126
+
127
+ #
128
+
129
+ # * Basic Settings
130
+
131
+ #
132
+
133
+ user = mysql
134
+
135
+ pid-file = /run/mysqld/mysqld.pid
136
+
137
+ socket = /run/mysqld/mysqld.sock
138
+
139
+ port = 3306
140
+
141
+ basedir = /usr
142
+
143
+ datadir = /var/lib/mysql
144
+
145
+ tmpdir = /tmp
146
+
147
+ lc-messages-dir = /usr/share/mysql
148
+
149
+ #skip-external-locking
150
+
151
+
152
+
153
+ # Instead of skip-networking the default is now to listen only on
154
+
155
+ # localhost which is more compatible and is not less secure.
156
+
157
+ bind-address = 127.0.0.1
158
+
159
+ bind-address = 192.168.100.1
160
+
161
+
162
+
163
+ #
164
+
165
+ # * Fine Tuning
166
+
167
+ #
168
+
169
+ #key_buffer_size = 16M
170
+
171
+ #max_allowed_packet = 16M
172
+
173
+ #thread_stack = 192K
174
+
175
+ #thread_cache_size = 8
176
+
177
+ # This replaces the startup script and checks MyISAM tables if needed
178
+
179
+ # the first time they are touched
180
+
181
+ #myisam_recover_options = BACKUP
182
+
183
+ #max_connections = 100
184
+
185
+ #table_cache = 64
186
+
187
+ #thread_concurrency = 10
188
+
189
+
190
+
191
+ #
192
+
193
+ # * Query Cache Configuration
194
+
195
+ #
196
+
197
+ #query_cache_limit = 1M
198
+
199
+ query_cache_size = 16M
200
+
201
+
202
+
203
+ #
204
+
205
+ # * Logging and Replication
206
+
207
+ #
208
+
209
+ # Both location gets rotated by the cronjob.
210
+
211
+ # Be aware that this log type is a performance killer.
212
+
213
+ # As of 5.1 you can enable the log at runtime!
214
+
215
+ #general_log_file = /var/log/mysql/mysql.log
216
+
217
+ #general_log = 1
218
+
219
+ #
220
+
221
+ # Error log - should be very few entries.
222
+
223
+ #
224
+
225
+ log_error = /var/log/mysql/error.log
226
+
227
+ #
228
+
229
+ # Enable the slow query log to see queries with especially long duration
230
+
231
+ #slow_query_log_file = /var/log/mysql/mariadb-slow.log
232
+
233
+ #long_query_time = 10
234
+
235
+ #log_slow_rate_limit = 1000
236
+
237
+ #log_slow_verbosity = query_plan
238
+
239
+ #log-queries-not-using-indexes
240
+
241
+ #
242
+
243
+ # The following can be used as easy to replay backup logs or for replication.
244
+
245
+ # note: if you are setting up a replication slave, see README.Debian about
246
+
247
+ # other settings you may need to change.
248
+
249
+ #server-id = 1
250
+
251
+ #log_bin = /var/log/mysql/mysql-bin.log
252
+
253
+ expire_logs_days = 10
254
+
255
+ #max_binlog_size = 100M
256
+
257
+ #binlog_do_db = include_database_name
258
+
259
+ #binlog_ignore_db = exclude_database_name
260
+
261
+
262
+
263
+ #
264
+
265
+ # * Security Features
266
+
267
+ #
268
+
269
+ # Read the manual, too, if you want chroot!
270
+
271
+ #chroot = /var/lib/mysql/
272
+
273
+ #
274
+
275
+ # For generating SSL certificates you can use for example the GUI tool "tinyca".
276
+
277
+ #
278
+
279
+ #ssl-ca = /etc/mysql/cacert.pem
280
+
281
+ #ssl-cert = /etc/mysql/server-cert.pem
282
+
283
+ #ssl-key = /etc/mysql/server-key.pem
284
+
285
+ #
286
+
287
+ # Accept only connections using the latest and most secure TLS protocol version.
288
+
289
+ # ..when MariaDB is compiled with OpenSSL:
290
+
291
+ #ssl-cipher = TLSv1.2
292
+
293
+ # ..when MariaDB is compiled with YaSSL (default in Debian):
294
+
295
+ #ssl = on
296
+
297
+
298
+
299
+ #
300
+
301
+ # * Character sets
302
+
303
+ #
304
+
305
+ # MySQL/MariaDB default is Latin1, but in Debian we rather default to the full
306
+
307
+ # utf8 4-byte character set. See also client.cnf
308
+
309
+ #
310
+
311
+ character-set-server = utf8mb4
312
+
313
+ collation-server = utf8mb4_general_ci
314
+
315
+
316
+
317
+ #
318
+
319
+ # * InnoDB
320
+
321
+ #
322
+
323
+ # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
324
+
325
+ # Read the manual for more InnoDB related options. There are many!
326
+
327
+
328
+
329
+ #
330
+
331
+ # * Unix socket authentication plugin is built-in since 10.0.22-6
332
+
333
+ #
334
+
335
+ # Needed so the root database user can authenticate without a password but
336
+
337
+ # only when running as the unix root user.
338
+
339
+ #
340
+
341
+ # Also available for other users if required.
342
+
343
+ # See https://mariadb.com/kb/en/unix_socket-authentication-plugin/
344
+
345
+
346
+
347
+ # this is only for embedded server
348
+
349
+ [embedded]
350
+
351
+
352
+
353
+ # This group is only read by MariaDB servers, not by MySQL.
354
+
355
+ # If you use the same .cnf file for MySQL and MariaDB,
356
+
357
+ # you can put MariaDB-only options here
358
+
359
+ [mariadb]
360
+
361
+
362
+
363
+ # This group is only read by MariaDB-10.3 servers.
364
+
365
+ # If you use the same .cnf file for MariaDB of different versions,
366
+
367
+ # use this group for options that older servers don't understand
368
+
369
+ [mariadb-10.3]
370
+
371
+ ```