2016년 3월 27일 일요일

MySQL 언어 설정

링크 참고 : link

show variables like '%character%';
show variables like 'collation%';


# Example MySQL config file for medium systems.
#
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is C:\mysql\data) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
default-character-set = utf8
port = 3306

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
default-character-set=utf8
character-set-server=utf8
skip-character-set-client-handshake

port = 3306
skip-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
skip-innodb

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking

# Replication Master Server (default)
# binary logging is required for replication
#log-bin=mysql-bin

# binary logging format - mixed recommended
#binlog_format=mixed

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
#server-id = 1

# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
#    the syntax is:
#
#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
#    where you replace <host>, <user>, <password> by quoted strings and
#    <port> by the master's port number (3306 by default).
#
#    Example:
#
#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
#    MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
#    start replication for the first time (even unsuccessfully, for example
#    if you mistyped the password in master-password and the slave fails to
#    connect), the slave will create a master.info file, and any later
#    change in this file to the variables' values below will be ignored and
#    overridden by the content of the master.info file, unless you shutdown
#    the slave server, delete master.info and restart the slaver server.
#    For that reason, you may want to leave the lines below untouched
#    (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id       = 2
#
# The replication master for this slave - required
#master-host     =   <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user     =   <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password =   <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port     =  <port>
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin

# Point the following paths to different dedicated disks
#tmpdir = /tmp/
#log-update = /path-to-dedicated-directory/hostname


# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = C:\mysql\data/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = C:\mysql\data/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

[mysqldump]
default-character-set = utf8
quick
max_allowed_packet = 16M

[mysql]
default-character-set = utf8
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout
=====================================================
apmsetup 설치 후 발생하는 초보자들의 좌충우돌 미친 삽집 

  이 사이트가 기존 질문과 답변 게시판에 있는 글을  검색하는 게 너무 어렵고
 짜증나서  
 내가 겪는 문제면 다른 사람도 겪는 거라 생각해서 적습니다.
 정말 이런곳에 적지 않는 귀차니즘 주의자지만
apmsetup을 설치할때마다 느끼는 고통이라 적습니다(자꾸 까먹어서 그렇지만.ㅎㅎ , 항상 몇시간을 끙끙된다)

이글은 정말 초보자들을 위한 착한 사람의 봉사 
apm_setup 관리자 비번 바꾸는건
apm_setup 모니터(빨간얼굴 히죽웃는 프로그램말이유~)
환경설정에 가서 바꾸는건 다 알거라 생각합니다.

문제는 ~
phpmyadmin 비번 변경이 처음엔 젤 많이 겪는 문제지
나온 화면 오른쪽 상단에 보면 phpmyadmin 이 있으니 그걸 누르면
phpmyadmin  이 나옵니다.
이거의 비번은 apmsetup이죠
비번을 바꿔야하는데
처음은 root 에 apmsetup 을 넣고 드가면 드갑니다.

 이건 다 알잖아 . 다른 놈도 알고 며느리도 알고.
 암호 바꿔야지 -> 1234로 바꿔야지
암호변경을 선택하고 변경했다.
안돼!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!꾸끼 어쩌구 어쩌구 한다. 시불
 자주하는 질문에 가서 본 건 시불 몬소리인지 도체 알수 없다. 짱난다. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 해결은 C:\APM_Setup\Server\phpMyAdmin   에 있는 config.inc.php 에서 controlpass 를 검색해서 처음으로 나오는 놈
$cfg['Servers'][$i]['controlpass']   = '1234';          // access to the "mysql/user"
1234로 바꿔준다.
저장하고
 으악 확힌해보자
 안될 이유가 없다.!~!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

다음날 (보통 여기 안된다고 적는 사람들 보면 다음날 컴퓨터를 키니 mysql 중지됨 이라고 계속 뜬다고 말한다)
히죽웃는 빨간 얼굴의 apmsetup 모니터에 mysql 이 시작이 안된다.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   phpmyadmin 비번 변경 후 그냥 어쩌다가 apmsetup 모니터 프로그램을 껐다가 다시 꼈을 경우
   아니면 그냥 mysql 서버를 다시 시작눌렀는대 중지중 이라고 만 뜨고 그냥 있을 경우~

   대부분 phpmyadmin 비번 변경후에 ~
   apmsetup 환경설정에 mysql 탭에 관리자 비번을 변경하지 않아서 그렇다.
  중요한건 대부분 phpmyadmin 비번 변경하고 그냥
  apmsetup 프로그램을 종료 시키거나 혹은 심심해서 만지다가 끄게 된다
 그러면  mysql 서버는 중지중이라고만 뜨고 배째버려서 강제종료하게 되는데
 그러고 나서는 절대 다시 mysql 서버 실행됨을 보지 못한다.
그러하여 재설치의 무한루프에 빠지지
 이유는 모른다. ㅎㅎㅎ

그러니깐 phpmyadmin 비번바꾸고
바로 
apmsetup 환경설정에서 mysql탭에 관리자 비번도 똑같게 ! 바꾸고
나서야 마음대로  mysql서버를 중지하고 실행해도 된다.

그러면 비번때문에 생기는 개 황당하고 어이없고 그지 같은 경우는 없을것같다.
단.완존 컴맹은 제오ㅣ



현재 세팅상황(한글 출력O)
# Example MySQL config file for medium systems.
#
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is C:\mysql\data) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
default-character-set = euckr
port = 3306

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
default-character-set=euckr
init_connect=SET collation_connection=euckr_korean_ci
init_connect=SET NAMES euckr
character-set-server=euckr
collation-server=euckr_korean_ci


port = 3306
skip-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
#skip-innodb

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!

#skip-networking

# Replication Master Server (default)
# binary logging is required for replication
#log-bin=mysql-bin

# binary logging format - mixed recommended
#binlog_format=mixed

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
#server-id = 1

# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
#    the syntax is:
#
#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
#    where you replace <host>, <user>, <password> by quoted strings and
#    <port> by the master's port number (3306 by default).
#
#    Example:
#
#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
#    MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
#    start replication for the first time (even unsuccessfully, for example
#    if you mistyped the password in master-password and the slave fails to
#    connect), the slave will create a master.info file, and any later
#    change in this file to the variables' values below will be ignored and
#    overridden by the content of the master.info file, unless you shutdown
#    the slave server, delete master.info and restart the slaver server.
#    For that reason, you may want to leave the lines below untouched
#    (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id       = 2
#
# The replication master for this slave - required
#master-host     =   <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user     =   <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password =   <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port     =  <port>
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin

# Point the following paths to different dedicated disks
#tmpdir = /tmp/
#log-update = /path-to-dedicated-directory/hostname


# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = C:\mysql\data/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = C:\mysql\data/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

[mysqldump]
default-character-set = euckr
quick
max_allowed_packet = 16M

[mysql]
default-character-set = euckr
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout


댓글 없음:

댓글 쓰기