- 설치 준비
- download : https://dev.mysql.com/downloads/mysql/5.7.html#downloads
- Select Platform에서 Linux-Generic 선택
- 'Linux - Generic (glibc 2.5) (x86, 64-bit), TAR ' download
- 설치
- 계정생성
- useradd -r mysql -U
- 설치파일
- tar -xvf mysql-5.7.17-linux-glibc2.5-x86_64.tar
- tar -zxvf mysql-5.7.17-linux-glibc2.5-x86_64.tar.gz
- mv mysql-5.7.17-linux-glibc2.5-x86_64 mysql-5.7.17
- cp mysql-5.7.17/mysql.server /etc/init.d/mysqld
- chmod 755 /etc/init.d/mysqld
- vi /etc/init.d/mysqld
- Config File 생성
- mkdir conf
- cp support-files/my-default.cnf /etc/my.cnf
- vi /etc/my.cnf
- Service 실행
- service mysqld start
# basedir= # datadir= # mysqld_pid_file_path= ## 주석 처리 |
[client] port = 3306 #mysql포트 socket = ./mysql-5.7.17/conf/mysql.sock default-character-set = utf8
[mysqld] basedir=/block3/mysql-5.7.17 #Mysql Engine Directory datadir=/block3/mysql-5.7.17/data/ #Data Directory init_connect = SET collation_connection = utf8_general_ci init_connect = SET NAMES utf8 character-set-server = utf8 collation-server = utf8_general_ci user=mysql #mysql계정 port=3306 #mysql포트 socket=/block3/mysql-5.7.17/conf/mysql.sock pid-file=/block3/mysql-5.7.17/conf/mysqld.pid [mysqldump] default-character-set = utf8 [mysql] default-character-set = utf8 # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 [mysqld_safe] log-error=/block3/mysql-5.7.17/log/mysqld.log #pid-file=/var/run/mysqld/mysqld.pid default-time-zone='UTC' [mysqld] log-error=/block3/mysql/log/error.log |