::: Zany's Homepage ::: Zany Wiki | »çÀÌÆ® ÅëÇÕ °Ë»ö
 
 
 

ÀϹݰèÁ¤À¸·Î MySQL Linux Generic (compressed tar) ¼³Ä¡ - v5.7.x

°Ô½ÃÆÇ
MySQL
ÀÛ¼ºÀÚ
helix
ÀÛ¼ºÀÏ
2018-05-07 01:47:31
ÀÐÀº¼ö
3042
ÆòÁ¡
   
Ç¥½Ã¿É¼Ç
HTML»ç¿ë | ÀÚµ¿BRűנ| °ø¹é¹®ÀÚÇã¿ë | °¡¿îµ¥Á¤·Ä | °íÁ¤Æø±Û²Ã | ÀÚµ¿URL¸µÅ© | ¸¶¿ì½º¼±ÅÃ
¡Ü MySQL 5.7.x Linux Generic (compressed tar) ¼³Ä¡ - centos, mac os x ¿¡¼­ Å×½ºÆ® µÊ.

¡Ü »çÀü ¶óÀ̺귯¸® ¼³Ä¡ ÀÛ¾÷ (root ±ÇÇÑ ÇÊ¿ä)
minimal ¿É¼ÇÀ¸·Î ¼³Ä¡µÈ centos ¿¡¼­´Â mysql initialize ½Ã ¾Æ·¡¿Í °°Àº ¶óÀ̺귯¸® ¿À·ù°¡ ¹ß»ýÇÑ´Ù.
CentOS ÆÐÅ°Áö ¸Å´ÏÀú(yum)¸¦ »ç¿ëÇÏ¿© ÇÊ¿äÇÑ ¶óÀ̺귯¸®¸¦ ¼³Ä¡ÇØÁØ´Ù.
(root ±ÇÇÑÀÌ ÇÊ¿äÇÑ ÀÛ¾÷ÀÌ´Ù)
[zany@c68test mysql]$ bin/mysqld --initialize --user=zany
bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

yum install libaio

[zany@c68test mysql]$ bin/mysqld --initialize --user=zany
bin/mysqld: error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or directory

yum install numactl

¡Ü OS ÆĶó¹ÌÅÍ ¼öÁ¤ (root ±ÇÇÑ ÇÊ¿ä)
mysql initialize ½Ã ¾Æ·¡¿Í °°ÀÌ max_open_files ¼³Á¤ °æ°í°¡ Ç¥½ÃµÇ´Â °æ¿ì, 
ÇØ´ç °èÁ¤¿¡ ÀûÀýÇÑ ÀÓ°è°ªÀ» ¼³Á¤ÇØ ÁØ´Ù.
(root ±ÇÇÑÀÌ ÇÊ¿äÇÑ ÀÛ¾÷ÀÌ´Ù)
[zany@c68test mysql]$ bin/mysqld --initialize --user=zany
mysqld: Can't create directory '/var/lib/mysql/' (Errcode: 13 - Permission denied)
2018-05-07T01:11:06.718546Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2018-05-07T01:11:06.718950Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2018-05-07T01:11:06.719455Z 0 [Warning] Ignoring user change to 'zany' because the user was set to 'mysql' earlier on the command line

2018-05-07T01:11:06.719494Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-05-07T01:11:06.720751Z 0 [ERROR] Can't find error-message file '/usr/local/mysql/share/errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
2018-05-07T01:11:06.722953Z 0 [ERROR] Aborting
http://home.zany.kr:9003/board/bView.asp?bCode=11&aCode=14200 Âü°íÇÏ¿© 
vi /etc/security/limits.conf
vi /etc/security/limits.d/90-nproc.conf ÆÄÀÏ¿¡
mysql ±âµ¿ °èÁ¤¿¡ ´ëÇÑ ÀûÀýÇÑ ÀÓ°èÄ¡ ¼³Á¤.

¡Ü mysql initialize
[zany@c68test mysql]$ bin/mysqld --initialize --user=zany --basedir=$MYSQL_HOME --datadir=$MYSQL_HOME/data
2018-05-07T01:25:17.999144Z 0 [Warning] Ignoring user change to 'zany' because the user was set to 'mysql' earlier on the command line

2018-05-07T01:25:17.999328Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-05-07T01:25:18.012145Z 0 [Warning] One can only use the --user switch if running as root

2018-05-07T01:25:18.495011Z 0 [Warning] InnoDB: New log files created, LSN=45790
2018-05-07T01:25:18.635788Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2018-05-07T01:25:18.758494Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 80cb4d7f-5195-11e8-93f8-000c29ba7bf4.
2018-05-07T01:25:18.764621Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2018-05-07T01:25:18.780941Z 1 [Note] A temporary password is generated for root@localhost: 6Y/h8.L!p;Ki

¡Ú À­ÁÙ, root Àӽà ºñ¹Ð¹øÈ£°¡ ¹ß±ÞµÇ¾ú´Ù°í Ç¥½ÃµÈ´Ù - 6Y/h8.L!p;Ki

¡Ü mysql ssl rsa setup
[zany@c68test mysql]$ bin/mysql_ssl_rsa_setup --basedir=$MYSQL_HOME --datadir=$MYSQL_HOME/data
Generating a 2048 bit RSA private key
..................................................+++
........+++
writing new private key to 'ca-key.pem'
-----
Generating a 2048 bit RSA private key
...................................................................................................................................................+++
...+++
writing new private key to 'server-key.pem'
-----
Generating a 2048 bit RSA private key
..........................................................................+++
......................................................+++
writing new private key to 'client-key.pem'
-----

¡Ü °ü·Ã ½ºÅ©¸³Æ® ÀÛ¾÷
¡Ü ¾Æ·¡ ¸µÅ©¸¦ Âü°íÇÏ¿© ±âµ¿,Á¾·á,ÇÁ·Î¼¼½ºÈ®ÀÎ µîÀÇ ½ºÅ©¸³Æ®¸¦ »ý¼ºÇÏ°í my.cnf ȯ°æ ÆÄÀÏÀ» ±¸¼ºÇÑ´Ù.
http://home.zany.kr:9003/board/bView.asp?bCode=18&aCode=14307

¡Ü mysql ±âµ¿
¾Õ¼­ ¸¸µç ½ºÅ©¸³Æ®¸¦ »ç¿ëÇÏ¿© mysql À» ±âµ¿ÇÑ´Ù.
[zany@c68test bin]$ mysql-start 
-----------------------------------
daemoncmd  : /home/zany/usr/tools/mysql/bin/mysqld_safe
-----------------------------------
defaults-file : /home/zany/usr/tools/mysql/my.cnf
ledir         : /home/zany/usr/tools/mysql/bin
basedir       : /home/zany/usr/tools/mysql
-----------------------------------
zany       2557   2556  2 11:22 pts/2    00:00:00 /bin/sh /home/zany/usr/tools/mysql/bin/mysqld_safe --defaults-file=/home/zany/usr/tools/mysql/my.cnf --ledir=/home/zany/usr/tools/mysql/bin --basedir=/home/zany/usr/tools/mysql
zany       2734   2557 26 11:22 pts/2    00:00:00 /home/zany/usr/tools/mysql/bin/mysqld --defaults-file=/home/zany/usr/tools/mysql/my.cnf --basedir=/home/zany/usr/tools/mysql --datadir=/home/zany/usr/tools/mysql/data --plugin-dir=/home/zany/usr/tools/mysql/lib/plugin --log-error=/home/zany/usr/tools/mysql/log/mysqld-err.log --pid-file=/home/zany/usr/tools/mysql/tmp/mysqld.pid --socket=/home/zany/usr/tools/mysql/tmp/mysql.sock


¡Ü mysql root login
[zany@c68test bin]$ mysql -u root -p
Enter password: À§¿¡ Ç¥½ÃµÈ Àӽà ºñ¹Ð¹øÈ£ ÀÔ·Â

mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('³»ºñ¹Ð¹øÈ£');

Âü°í) mysql 5.7 Linux Generic °ø½Ä ¼³Ä¡ ¸Å´º¾ó
https://dev.mysql.com/doc/refman/5.7/en/binary-installation.html
shell> groupadd mysql
shell> useradd -r -g mysql -s /bin/false mysql
shell> cd /usr/local
shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> mkdir mysql-files
shell> chown mysql:mysql mysql-files
shell> chmod 750 mysql-files
shell> bin/mysqld --initialize --user=mysql 
shell> bin/mysql_ssl_rsa_setup
shell> bin/mysqld_safe --user=mysql &
# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysql.server

 °Ô½ÃÆÇ ±Û ¸ñ·Ï
No Subject Poster Hits Posted
14307 helix 1846 2018-05-07 02:15:24
helix 3042 2018-05-07 01:47:31
13492 helix 3280 2016-07-06 02:36:36
9622 helix 4137 2014-10-31 10:55:42
8757 helix 3166 2014-07-04 13:14:50
8275 helix 3453 2014-05-06 10:34:10
7044 helix 2734 2013-12-10 14:18:14
ÄÚ¸àÆ®
ÀÛ¼ºÀÚ
                       
 
zany.kr
  Copyright ¨Ï 2002-2010 Zany's Programming Lab. All Rights Not Reserved.
temporary This Page loads on 0.031 Secs