MySQL 3

k8s_wordpress + mysql 연동

이번에는 mysql과 wordpress pod을 만들어 연동시켜 서비스 하는 실습을 해보겠다. Requirement - mysql 5.7 - wordpress https://kubernetes.io/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/ Example: Deploying WordPress and MySQL with Persistent Volumes This tutorial shows you how to deploy a WordPress site and a MySQL database using Minikube. Both applications use PersistentVolumes and PersistentVolumeC..

Docker, k8s 2023.09.17

WINDOW FUCTION (MySQL)

SQL에는 Window function이 존재한다. Window Fuction 행과 행 사이의 관계를 표현해준다. 테이블의 특정 조건의 집계 , 순위 등을 쉽게 표현해준다. 1. 기본 문법 Select 윈도우함수 over (partition by 칼럼 order by 칼럼 윈도잉절) from 테이블명 Partition by 그룹핑 기준 Order by 순위 지정 기준 윈도잉절 : 함수의 대상이되는 행 범위 지점 Unbounded preceding - 이전행 Unbounded following- 다음행 1-(1) 집계함수 AVG ,COUNT,SUM,MAX, MIN 등 가능합니다. SUM 예시를 한번 들어보도록 하겠습니다. 테이블은 Mysql 기본 데이터인 sakila 중 payment를 사용하도록 하겠습니..

SQL 2023.08.29

Linux_ wordpress , mysql(8.0) , php(8.0) 연동

이번에는 2Tier 구성인 worpress와 php 그리고 db인 mysql과 연동하는 방법에 대해 기록해보도록 하겠다. 시뮬레이션은 아래와 같다고 가정하고 해보겠다. 1번 server 2번 server Mysql-client 8.0 Mysql-server 8.0 wordpress php http 대략적인 순서는 다음과 같다. 순서 1번서버 http , wordpress , php mysql 패키지 설치 wordpress 설정파일 -> html 파일로 이동 wp-config.php 파일 만든 이후 db 연동 설정 http.conf 에서 index.html이 아닌 index.php 파일 읽도록 설정 -> 방화벽설정 2번서버 mysql-server 패키지 설치 mysql 보안설정을 통해 원격제어 허용 및 방..

Linux 2023.08.26