yum -y install ncurses-devel
wget -P /root/src/ http://tcs-down.simplexi.com/jykim03/mysql/mysql-5.1.73.tar.gz
cd /root/src; tar xvzf mysql-5.1.73.tar.gz; cd mysql-5.1.73
./configure --prefix=/opt/mysql --with-readline --without-debug --enable-shared --with-charset=euckr --with-extra-charsets=all --with-big-tables --enable-thread-safe-client --with-named-thread-libs=-lpthread --with-plugins=myisam,innobase,archive,csv,partition --with-ssl
make -j `grep processor /proc/cpuinfo | wc -l`; make install
useradd -M -s /bin/false mysql
/opt/mysql/bin/mysql_install_db --datadir=/opt/mysql/var --force
chown -R mysql:mysql /opt/mysql/
2) my.cnf 설정
/etc/my.cnf
[mysqld]
init_connect=SET collation_connection=utf8_general_ci
init_connect=SET NAMES utf8
character-set-server=utf8
collation-server=utf8_general_ci
table_cache=1024
max_connections=2048
max_user_connections=500
max_connect_errors=10000
wait_timeout=300
query_cache_type=1
query_cache_size=128M
query_cache_limit=5M
slow_query_log
long_query_time=3
max_allowed_packet=16M
sort_buffer_size=2M
skip-innodb
skip-name-resolve
symbolic-links=0
[mysql]
default-character-set=utf8
3) 구동 스크립트 수정
[root@q352-4309 /]# vim /opt/mysql/share/mysql/mysql.server
basedir=/opt/mysql
datadir=/opt/mysql/var
4) MySQL 서비스 구동 및 접속 확인
[root@q352-4309 /]# /opt/mysql/share/mysql/mysql.server start
Starting MySQL. SUCCESS!
[root@q352-4309 /]# netstat -nltp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 17345/mysqld
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1535/sshd
tcp 0 0 :::5000 :::* LISTEN 1555/thttpd
tcp 0 0 :::22 :::* LISTEN 1535/sshd
[root@q352-4309 /]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.73-log 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>
'On-premise > Mysql, Mariadb' 카테고리의 다른 글
| MySQL 5.7 에서 Warning 안뜨게 하는법 (MySQL 5.7 설치법) (0) | 2023.11.05 |
|---|---|
| ERROR! The server quit without updating PID file 에러 발생 (0) | 2023.11.05 |
| MariaDB 10.4.10 (0) | 2023.11.05 |
| MariaDB 10.1.21 (0) | 2023.11.05 |
| MariaDB 10.0.21 (0) | 2023.11.05 |