質問編集履歴
2
my.cnf、show variables like 'char%';の結果の件
test
CHANGED
File without changes
|
test
CHANGED
@@ -47,3 +47,365 @@
|
|
47
47
|
my.cnfを初期状態に戻し、my.cnfにサイトに書いてあることの通りの記述をしました。
|
48
48
|
|
49
49
|
参照:http://514design.jp/2013/01/mysql-character-set/
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
-my.cnfの内容
|
54
|
+
|
55
|
+
# Example MySQL config file for medium systems.
|
56
|
+
|
57
|
+
#
|
58
|
+
|
59
|
+
# This is for a system with little memory (32M - 64M) where MySQL plays
|
60
|
+
|
61
|
+
# an important part, or systems up to 128M where MySQL is used together with
|
62
|
+
|
63
|
+
# other programs (such as a web server)
|
64
|
+
|
65
|
+
#
|
66
|
+
|
67
|
+
# You can copy this file to
|
68
|
+
|
69
|
+
# /etc/my.cnf to set global options,
|
70
|
+
|
71
|
+
# mysql-data-dir/my.cnf to set server-specific options (in this
|
72
|
+
|
73
|
+
# installation this directory is /Applications/XAMPP/xamppfiles/var/mysql) or
|
74
|
+
|
75
|
+
# ~/.my.cnf to set user-specific options.
|
76
|
+
|
77
|
+
#
|
78
|
+
|
79
|
+
# In this file, you can use all long options that a program supports.
|
80
|
+
|
81
|
+
# If you want to know which options a program supports, run the program
|
82
|
+
|
83
|
+
# with the "--help" option.
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
# The following options will be passed to all MySQL clients
|
88
|
+
|
89
|
+
[client]
|
90
|
+
|
91
|
+
#password = your_password
|
92
|
+
|
93
|
+
port = 3306
|
94
|
+
|
95
|
+
socket = /Applications/XAMPP/xamppfiles/var/mysql/mysql.sock
|
96
|
+
|
97
|
+
default-character-set=utf8
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
# Here follows entries for some specific programs
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
# The MySQL server
|
106
|
+
|
107
|
+
[mysqld]
|
108
|
+
|
109
|
+
character-set-server=utf8
|
110
|
+
|
111
|
+
user = mysql
|
112
|
+
|
113
|
+
port=3306
|
114
|
+
|
115
|
+
socket = /Applications/XAMPP/xamppfiles/var/mysql/mysql.sock
|
116
|
+
|
117
|
+
skip-external-locking
|
118
|
+
|
119
|
+
key_buffer = 16M
|
120
|
+
|
121
|
+
max_allowed_packet = 1M
|
122
|
+
|
123
|
+
table_open_cache = 64
|
124
|
+
|
125
|
+
sort_buffer_size = 512K
|
126
|
+
|
127
|
+
net_buffer_length = 8K
|
128
|
+
|
129
|
+
read_buffer_size = 256K
|
130
|
+
|
131
|
+
read_rnd_buffer_size = 512K
|
132
|
+
|
133
|
+
myisam_sort_buffer_size = 8M
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
# Where do all the plugins live
|
138
|
+
|
139
|
+
plugin_dir = /Applications/XAMPP/xamppfiles/lib/mysql/plugin/
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
# Don't listen on a TCP/IP port at all. This can be a security enhancement,
|
144
|
+
|
145
|
+
# if all processes that need to connect to mysqld run on the same host.
|
146
|
+
|
147
|
+
# All interaction with mysqld must be made via Unix sockets or named pipes.
|
148
|
+
|
149
|
+
# Note that using this option without enabling named pipes on Windows
|
150
|
+
|
151
|
+
# (via the "enable-named-pipe" option) will render mysqld useless!
|
152
|
+
|
153
|
+
#
|
154
|
+
|
155
|
+
# commented in by xampp security
|
156
|
+
|
157
|
+
#skip-networking
|
158
|
+
|
159
|
+
skip-networking
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
# Replication Master Server (default)
|
164
|
+
|
165
|
+
# binary logging is required for replication
|
166
|
+
|
167
|
+
# log-bin deactivated by default since XAMPP 1.4.11
|
168
|
+
|
169
|
+
#log-bin=mysql-bin
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
# required unique id between 1 and 2^32 - 1
|
174
|
+
|
175
|
+
# defaults to 1 if master-host is not set
|
176
|
+
|
177
|
+
# but will not function as a master if omitted
|
178
|
+
|
179
|
+
server-id = 1
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
# Replication Slave (comment out master section to use this)
|
184
|
+
|
185
|
+
#
|
186
|
+
|
187
|
+
# To configure this host as a replication slave, you can choose between
|
188
|
+
|
189
|
+
# two methods :
|
190
|
+
|
191
|
+
#
|
192
|
+
|
193
|
+
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
|
194
|
+
|
195
|
+
# the syntax is:
|
196
|
+
|
197
|
+
#
|
198
|
+
|
199
|
+
# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
|
200
|
+
|
201
|
+
# MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
|
202
|
+
|
203
|
+
#
|
204
|
+
|
205
|
+
# where you replace <host>, <user>, <password> by quoted strings and
|
206
|
+
|
207
|
+
# <port> by the master's port number (3306 by default).
|
208
|
+
|
209
|
+
#
|
210
|
+
|
211
|
+
# Example:
|
212
|
+
|
213
|
+
#
|
214
|
+
|
215
|
+
# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
|
216
|
+
|
217
|
+
# MASTER_USER='joe', MASTER_PASSWORD='secret';
|
218
|
+
|
219
|
+
#
|
220
|
+
|
221
|
+
# OR
|
222
|
+
|
223
|
+
#
|
224
|
+
|
225
|
+
# 2) Set the variables below. However, in case you choose this method, then
|
226
|
+
|
227
|
+
# start replication for the first time (even unsuccessfully, for example
|
228
|
+
|
229
|
+
# if you mistyped the password in master-password and the slave fails to
|
230
|
+
|
231
|
+
# connect), the slave will create a master.info file, and any later
|
232
|
+
|
233
|
+
# change in this file to the variables' values below will be ignored and
|
234
|
+
|
235
|
+
# overridden by the content of the master.info file, unless you shutdown
|
236
|
+
|
237
|
+
# the slave server, delete master.info and restart the slaver server.
|
238
|
+
|
239
|
+
# For that reason, you may want to leave the lines below untouched
|
240
|
+
|
241
|
+
# (commented) and instead use CHANGE MASTER TO (see above)
|
242
|
+
|
243
|
+
#
|
244
|
+
|
245
|
+
# required unique id between 2 and 2^32 - 1
|
246
|
+
|
247
|
+
# (and different from the master)
|
248
|
+
|
249
|
+
# defaults to 2 if master-host is set
|
250
|
+
|
251
|
+
# but will not function as a slave if omitted
|
252
|
+
|
253
|
+
#server-id = 2
|
254
|
+
|
255
|
+
#
|
256
|
+
|
257
|
+
# The replication master for this slave - required
|
258
|
+
|
259
|
+
#master-host = <hostname>
|
260
|
+
|
261
|
+
#
|
262
|
+
|
263
|
+
# The username the slave will use for authentication when connecting
|
264
|
+
|
265
|
+
# to the master - required
|
266
|
+
|
267
|
+
#master-user = <username>
|
268
|
+
|
269
|
+
#
|
270
|
+
|
271
|
+
# The password the slave will authenticate with when connecting to
|
272
|
+
|
273
|
+
# the master - required
|
274
|
+
|
275
|
+
#master-password = <password>
|
276
|
+
|
277
|
+
#
|
278
|
+
|
279
|
+
# The port the master is listening on.
|
280
|
+
|
281
|
+
# optional - defaults to 3306
|
282
|
+
|
283
|
+
#master-port = <port>
|
284
|
+
|
285
|
+
#
|
286
|
+
|
287
|
+
# binary logging - not required for slaves, but recommended
|
288
|
+
|
289
|
+
#log-bin=mysql-bin
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
# Point the following paths to different dedicated disks
|
296
|
+
|
297
|
+
tmpdir = /Applications/XAMPP/xamppfiles/temp/mysql
|
298
|
+
|
299
|
+
#log-update = /path-to-dedicated-directory/hostname
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
# Uncomment the following if you are using BDB tables
|
304
|
+
|
305
|
+
#bdb_cache_size = 4M
|
306
|
+
|
307
|
+
#bdb_max_lock = 10000
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
# Comment the following if you are using InnoDB tables
|
312
|
+
|
313
|
+
#skip-innodb
|
314
|
+
|
315
|
+
innodb_data_home_dir = /Applications/XAMPP/xamppfiles/var/mysql/
|
316
|
+
|
317
|
+
innodb_data_file_path = ibdata1:10M:autoextend
|
318
|
+
|
319
|
+
innodb_log_group_home_dir = /Applications/XAMPP/xamppfiles/var/mysql/
|
320
|
+
|
321
|
+
# You can set .._buffer_pool_size up to 50 - 80 %
|
322
|
+
|
323
|
+
# of RAM but beware of setting memory usage too high
|
324
|
+
|
325
|
+
innodb_buffer_pool_size = 16M
|
326
|
+
|
327
|
+
# Deprecated in 5.6
|
328
|
+
|
329
|
+
#innodb_additional_mem_pool_size = 2M
|
330
|
+
|
331
|
+
# Set .._log_file_size to 25 % of buffer pool size
|
332
|
+
|
333
|
+
innodb_log_file_size = 5M
|
334
|
+
|
335
|
+
innodb_log_buffer_size = 8M
|
336
|
+
|
337
|
+
innodb_flush_log_at_trx_commit = 1
|
338
|
+
|
339
|
+
innodb_lock_wait_timeout = 50
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
[mysqldump]
|
344
|
+
|
345
|
+
quick
|
346
|
+
|
347
|
+
max_allowed_packet = 16M
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
[mysql]
|
352
|
+
|
353
|
+
no-auto-rehash
|
354
|
+
|
355
|
+
# Remove the next comment character if you are not familiar with SQL
|
356
|
+
|
357
|
+
#safe-updates
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
[isamchk]
|
362
|
+
|
363
|
+
key_buffer = 20M
|
364
|
+
|
365
|
+
sort_buffer_size = 20M
|
366
|
+
|
367
|
+
read_buffer = 2M
|
368
|
+
|
369
|
+
write_buffer = 2M
|
370
|
+
|
371
|
+
|
372
|
+
|
373
|
+
[myisamchk]
|
374
|
+
|
375
|
+
key_buffer = 20M
|
376
|
+
|
377
|
+
sort_buffer_size = 20M
|
378
|
+
|
379
|
+
read_buffer = 2M
|
380
|
+
|
381
|
+
write_buffer = 2M
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
[mysqlhotcopy]
|
386
|
+
|
387
|
+
interactive-timeout
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
!include /Applications/XAMPP/xamppfiles/mysql/my.cnf
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
-show variables like 'char%';の結果
|
396
|
+
|
397
|
+
character_set_client utf8
|
398
|
+
|
399
|
+
character_set_connect utf8
|
400
|
+
|
401
|
+
character_set_database latin1
|
402
|
+
|
403
|
+
character_set_filesystem binary
|
404
|
+
|
405
|
+
character_set_results utf8
|
406
|
+
|
407
|
+
character_set_server latin1
|
408
|
+
|
409
|
+
character_set_system utf8
|
410
|
+
|
411
|
+
character_sets_dir /usr/local/mysql-5.6.25-osx10.8-x86_64/share/charsets/
|
1
MySQLの文字コードをutf8にする際に行ったことを詳細に記述しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -23,3 +23,27 @@
|
|
23
23
|
|
24
24
|
|
25
25
|
分かる方がいれば、教えていただけると助かります。
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
初期状態のmy.cnfにmysqldとclientに書いてある通りの記述をしました。
|
30
|
+
|
31
|
+
参照:http://qiita.com/YusukeHigaki/items/2cab311d2a559a543e3a
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
my.cnfを初期状態に戻し、my.cnfのmysqldumpとmysqlに書いてある通りの記述をしました。
|
36
|
+
|
37
|
+
参照:http://mysqlx01.seesaa.net
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
my.cnfを初期状態に戻し、my.cnfのmysqldとclientとmysqlに書いてある通りの記述をしました。
|
42
|
+
|
43
|
+
参照:http://www.dbonline.jp/mysql/myini/index3.html
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
my.cnfを初期状態に戻し、my.cnfにサイトに書いてあることの通りの記述をしました。
|
48
|
+
|
49
|
+
参照:http://514design.jp/2013/01/mysql-character-set/
|