티스토리 뷰
반응형
[~] brew services list # service 상태 확인
Name Status User File
mysql started ingnoh [...]
[~] brew services stop mysql # 삭제를 위해 service 중지
[~] brew uninstall mysql # mysql 삭제
# 대충 삭제 과정...
# 오래 걸리진 않는다...
[~] brew install mysql@8.4
# 대충 설치 과정...
# 이건 오래 걸린다...
[~] brew services start mysql@8.4 # mysql 8.4 서비스 시작
[~] mysql --help | grep my.cnf # 포트 번호 설정을 위한 my.cnf 파일 조회
order of preference, my.cnf, $MYSQL_TCP_PORT,
/etc/my.cnf /etc/mysql/my.cnf /opt/homebrew/etc/my.cnf ~/.my.cnf
[~] brew services stop mysql@8.4 # 포트 번호 설정을 위해 일단 mysql 서비스를 종료해둔다.
[~] # homebre로 설치했으니 /opt/homebrew/etc/my.cnf에 있다!
[~] cat /opt/homebrew/etc/my.cnf
# Default Homebrew MySQL server config
[mysqld]
# Only allow connections from localhost
bind-address = 127.0.0.1
[~] echo 'port=13306' >> /opt/homebrew/etc/my.cnf # 13306 자리에 원하는 포트 명을 입력한다.
[~] cat /opt/homebrew/etc/my.cnf
# Default Homebrew MySQL server config
[mysqld]
# Only allow connections from localhost
bind-address = 127.0.0.1
port=13306
[~] brew services start mysql@8.4 # 포트 번호 적용을 위해 mysql 서비스를 시작한다.
[~] lsof -i :13306 # 요 명령어로 확인 가능하다
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mysqld 99999 ingnoh 21u IPv4 0x0000000000000000 0t0 TCP localhost:13306 (LISTEN)
[~] # 끄읏
참고
'Dev. > persistence' 카테고리의 다른 글
[Docker] no matching manifest for linux/amd64/v8 현상 해결법 (0) | 2024.03.27 |
---|---|
[MySQL] VARCHAR(256)보다 VARCHAR(255)를 사용하는 이유 (0) | 2024.03.06 |
[MySQL] 이모지가 포함된 컬럼에 UQ 제약조건 걸기 (0) | 2024.02.14 |
[MySQL] 테이블, 컬럼 collation 확인하기 (0) | 2024.02.14 |
[DB] 낙관적 락과 비관적 락 (0) | 2023.10.10 |
댓글
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- etc
- terraform
- JPA
- react
- spring boot
- Database
- Linux
- javascript
- JEST
- shell
- RancherDesktop
- IntelliJ
- Gradle
- eureka
- Spring Cloud Config
- AWS IoT
- mysql
- AWS
- Java
- postgresql
- kotlin
- Git
- Node.js
- Docker
- jQuery
- hashicorp
- pgloader
- Puppeteer
- Vault
- 코딩테스트
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함