Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 | 31 |
Tags
- Cluster
- mysql
- IPA
- beanCreationException
- bash
- color
- delete button
- UITextField
- command not found
- 삭제
- dataSource
- KVO_IS_RETAINING_ALL_OBSERVERS_OF_THIS_OBJECT_IF_IT_CRASHES_AN_OBSERVER_WAS_OVERRELEASED_OR_SMASHED
- DELETE
- backspace
- 삭제버튼
- 실행
- NoClassDefFoundError
- Query
- itunes
- sqlSession
- 단축키
- Detect
- mybatis
- googlemap
- 색상 변경
- KVO
- 아이튠즈
- api19
- Exception
- Drawer
Archives
- Today
- Total
BlueAroma
[Error] mysql 실행 시 -bash: mysql: command not found 에러 본문
내맘대로 프로그래밍/Server
[Error] mysql 실행 시 -bash: mysql: command not found 에러
BlueAroma 2018. 1. 23. 21:48잊지않기 위해 정리...
mysql 실행 시 -bash: mysql: command not found
mysql 실행 할때 mysql command를 찾을 수 없기 때문에 나오는 에러.
mysql 의 명령어 경로 (/usr/local/mysql/bin) 를 환경변수로 지정하지 않은 경우 bin폴더 외부에서
명령어를 호출하면 발생한다.
환경변수를 지정하고 싶지 않은 경우는 /usr/local/mysql/bin 로 이동하여 ./mysql ... 으로 실행하면 된다.
서버 폴더 내 어디서든 mysql 명령어를 실행하길 원한다면 아래와 같이 설정한다.
$ cd /etc
$ sudo vi profile ( 권한 필요 )
profile 정보 맨 하단으로 이동하여
export DB_HOME=/usr/local/mysql
export PATH="$PATH:/usr/local/mysql/bin"
를 추가한 후
$ source /etc/profile
까지 완료하면 이젠 어디서든 mysql 명령어를 사용할 수 있다.
'내맘대로 프로그래밍 > Server' 카테고리의 다른 글
[ERROR] BeanCreationException 과 NoClassDefFoundError (0) | 2018.01.24 |
---|
Comments