Linux/RedHat, CentOS, ubuntu

CentOS7 mariadb port 변경

Pydole 2020. 1. 31. 09:13

 

/etc/my.cnf.d/server.cnf 파일에서 [mysqld] 섹션에 port=변경할포트

 

 

 

 

SElinux가 활성화 되어 있다면 포트추가

 

# semanage port -a -t mysqld_port_t -p tcp [변경할포트]

 

# semanage port -l | grep mysqld_port_t
mysqld_port_t                  tcp      [변경할포트], 1186, 3306, 63132-63164

 

 

방화벽 설정이 되어 있다면, 방화벽을 추가하고, 데몬을 재기동