Settings/Setting

MySQL 설치 -> Window git bash로 MySQL 실행하기

Juzdalua 2024. 7. 19. 14:48

mysql 설치

https://dev.mysql.com/downloads/installer/

 

MySQL :: Download MySQL Installer

Note: MySQL 8.0 is the final series with MySQL Installer. As of MySQL 8.1, use a MySQL product's MSI or Zip archive for installation. MySQL Server 8.1 and higher also bundle MySQL Configurator, a tool that helps configure MySQL Server.

dev.mysql.com

 

 

Git bash에서 실행시 에러 발생)

zsh: command not found: mysql

 

Path 설정)

C:\Program Files\MySQL\MySQL Server 8.0\bin

 

고급 시스템 설정 -> 환경변수 -> Path 편집 -> 새로만들기 Path 입력 -> 재부팅

 

 

cmd에서는 mysql 명령어가 작동한다.

zsh를 쓰고싶으면 winpty 명령어를 사용해야함.

 

참고) window에서 winpty를 써야하는 이유

https://stackoverflow.com/questions/48199794/winpty-and-git-bash

 

Winpty and Git Bash

I had the same issue as Python not working in the command line of git bash, where in Git Bash, when I type Python, it just hangs. However, typing winpty python works perfectly. What exactly is wi...

stackoverflow.com