#yum install cmake ncurses-devel
#groupadd -g 400 mysql
#useradd -u400 -g400 -d /usr/local/mysql -s /bin/false mysql
https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.10.tar.gz
#tar xvfz mysql-5.7.x.tar.gz
#cd mysql-5.7.x
#cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data -DENABLED_LOCAL_INFILE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DSYSCONFDIR=/etc -DDEFAULT_CHARSET=utf8 -DMYSQL_TCP_PORT=3306 -DWITH_EXTRA_CHARSETS=all -DDEFAULT_COLLATION=utf8_general_ci -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/include/boost
(--DDEFAULT_CHARSET=euckr --DDEFAULT_COLLATION=euckr_korean_ci 로 변경 가능)
#make
#make install
- 초기 데이터베이스 구성 및 권한 설정
# /usr/local/src/mysql-5.7.x/client/mysql_install_db –user=mysql --datadir=/usr/local/mysql/data –basedir=/usr/local/mysql
# chown -R mysql.mysql /usr/local/mysql
# chmod 711 /usr/local/mysql
# chmod 700 /usr/local/mysql/data
# chmod 751 /usr/local/mysql/bin
# chmod 750 /usr/local/mysql/bin/*
# chmod 755 /usr/local/mysql/bin/mysql
# chmod 755 /usr/local/mysql/bin/mysqldump
boost 설치
#cd /usr/local/include/boost/boost_1_59_0
#./bootstrap.sh
#./b2 install
자동 실행 설정 및 데이터 디렉토리 설정
#cp -arp /usr/local/mysql/support -files/my-default.cnf /etc/my.cnf
#cp -arp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
#chmod 700 /etc/init.d/mysqld
#vi /etc/my.cnf
basedir = /usr/local/mysql
datadir = /usr/local/mysql/data
port = 3306
#chkconfig --add mysqld
#chkconfig --level mysqld on
초기 로그인
#vi /root/.mysql_secret <- 여기 에서 초기 패스워드 확인.
위의 방법 말고 safe 모드로 접속하는 방법이 있다.
#/etc/init.d/mysqld stop
#/usr/local/mysql/bin/mysqld_safe --skip-grant-tables &
#mysql
mysql>update user set authentication_string=password('패스워드') where user='root';
Query OK, 0 rows affected (0.00 sec)
mysql>flush privileges;
Query OK,0 rows affected (0.00 sec)
SET PASSWORD = PASSWORD('your_new_password');
'APM' 카테고리의 다른 글
centos6 apache2.2 + php5.3 + mysql5.1 (0) | 2019.06.26 |
---|---|
centos6 mariadb 10.1 , php5.4 yum설치 (0) | 2019.06.11 |
ubuntu 18 apm 소스설치 (0) | 2019.06.01 |
apache 2.4.x 설치 (0) | 2019.04.30 |
mysql 설치 (0) | 2019.01.30 |