변군이글루
[MySQL] 5.6.x MySQL 설치 본문
MySQL 설치(5.6.x)
다운로드
http://mirror.cogentco.com/pub/mysql/MySQL-5.6/
1. 라이브러리 설치
[[email protected] src]# yum install cmake ncurses-devel
2. MySQL 설치
[[email protected] src]# tar xvfz mysql-5.6.13.tar.gz
[[email protected] mysql-5.6.13]# useradd -m -c "MySQL Server" -d /usr/local/mysql -s /bin/false -u 27 mysql
[[email protected] mysql-5.6.13]# cmake \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DMYSQL_DATADIR=/usr/local/mysql/data \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_EXTRA_CHARSETS=all \
-DMYSQL_UNIX_ADDR=/tmp/mysql.socket
-------------------------------------------------------------------------------------------
[[email protected] mysql-5.6.13]# cmake \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql \ //MySQL 디렉토리 지정
-DMYSQL_DATADIR=/usr/local/mysql/data \ //DB(data) 디렉토리 지정
-DDEFAULT_CHARSET=utf8 \ //문서의 기본 언어셋
-DDEFAULT_COLLATION=utf8_general_ci \ //DB의 언어셋
-DWITH_EXTRA_CHARSETS=all \ //name 추가로 지정할 언어로 기본값은 all
-DMYSQL_UNIX_ADDR=/tmp/mysql.socket //소켓 디렉토리 지정
-------------------------------------------------------------------------------------------
[[email protected] mysql-5.6.13]# make && make install
[[email protected] mysql]# cp /usr/local/mysql/my.cnf /etc/my.cnf
[[email protected] mysql]# chown -R mysql.mysql /usr/local/mysql/data
[[email protected] mysql]# ls -al | grep data
drwxr-xr-x 3 mysql mysql 4096 2013-08-17 20:54 data
[[email protected] mysql]# /usr/local/mysql/bin/mysql --verbose --help | grep -A 1 'Default options'
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf
[[email protected] mysql]# /usr/local/mysql/scripts/mysql_install_db --defaults-file=/etc/my.cnf --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
[[email protected] mysql]# /usr/local/mysql/bin/mysqld_safe &
[1] 329
[[email protected] mysql]# 130817 21:23:58 mysqld_safe Logging to '/usr/local/mysql/data/lamp.sangchul.kr.err'.
130817 21:23:58 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
[[email protected] mysql]# ps -ef | grep mysql | grep -v grep
root 329 14016 0 21:23 pts/0 00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe
mysql 424 329 2 21:23 pts/0 00:00:00 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/usr/local/mysql/data/lamp.sangchul.kr.err --pid-file=/usr/local/mysql/data/lamp.sangchul.kr.pid
[[email protected] mysql]# ln -s /usr/local/mysql/bin/mysql /usr/bin/
[[email protected] mysql]# /usr/local/mysql/bin/mysqladmin -u root password "비밀번호"
[[email protected] mysql]# mysql -u root -p mysql
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.13 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
'및___APM' 카테고리의 다른 글
[APM] APM 설치(mysql, apache, php, zend)_201308 (0) | 2013.08.18 |
---|---|
[MySQL] [error] cannot remove `libtoolT': No such file or directory (0) | 2013.08.18 |
[MySQL] 5.6.x MySQL 설치 (0) | 2013.08.17 |
[mysql] 리눅스 쉘상태에서 DB 및 테이블 생성 (2) | 2013.08.14 |
[mysql] mysql 리플리케이션(replication) 설정 방법 (0) | 2013.07.24 |
[mysql] mysql root 패스워드 설정 및 변경 (0) | 2013.07.24 |