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
- snmp
- python popen
- c3 second
- c3 축 없애기
- gcc regex
- grafana dashboard
- 정규식 활용
- linux시간으로 변경
- c3 축 가리기
- snmp test
- telegraf
- 정규식 문자열 출력
- 백준
- 1697
- selinux port 등록
- c3 초
- 정규식 컴파일
- semanage
- CentOS7
- centos pyhon 설치
- g++ 업데이트
- python subprocess
- python os
- subporcess path
- c++ 정규식
- regex_search
- c3 step graph
- influxdb 설치
- gcc 업데이트
- InfluxDB
Archives
- Today
- Total
리셋 되지 말자
[Mysql] auto login 및 command로 query 보내기 본문
참고사이트
- https://stackoverflow.com/questions/13814413/how-to-auto-login-in-mysql-from-a-shell-script
id, password로 접속해야할 때 -p
옵션을 이용하면 계속 패스워드를 입력해야 하는 상황이 있다.
mysql -uroot -hdb-dns-name -p -e "show databases;"
Enter password:
이때 접속하는 유저의 홈 디렉토리에 .my.cnf
파일을 작성하면 패스워드 입력 없이 자동으로 로그인이 가능하다. 이때는 -p
옵션 없이 사용해야 한다.
[client]
user=root
password=password
'Database' 카테고리의 다른 글
[MongoDB] db, collection, user 생성 (0) | 2023.06.05 |
---|---|
[Postgres] psycopg2-binary 설치 (0) | 2021.06.22 |
[MySQL 8.0] nodejs mysql 연동 에러 (0) | 2020.09.18 |
[MySQL 8.0] password policy 변경 (0) | 2020.09.18 |
[JDBC] AUTO_INCREMENT key값을 이용한 JDBC 프로그래밍 (0) | 2019.11.26 |
Comments