250x250
반응형
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 |
Tags
- wordpress
- Linux
- Mac
- SSL
- git pull
- Apache
- LetsEncrypt
- non-www
- CentOS7
- 구글 클라우드
- vscode
- Xdebug
- front page
- home page
- launch.json
- php
- Google Cloud
- https
- mysql
- MariaDB
- crontab
- child theme
- Fail2ban
- new user
- root
- DOM Parser
- html
- centos
- Liniux
- Certbot
Archives
- Today
- Total
between 0 and 1
[MySQL] backup (mysqldump) bash script without password 본문
Software Development Engineering/MySQL
[MySQL] backup (mysqldump) bash script without password
devxpert.yoon 2021. 1. 26. 17:09728x90
반응형
to backup by using mysqldump without password,
it needs 2 files.
- bash script file (~.sh) and mysql configuration file (w/ any filename and extension)
1. create bash script file.
$> vim backup.sh
mysqldump --defaults-extra-file=./.sqlconf databaseName > ./backupdb/"$(date '+%F').sql"
* -p option must be excluded from the command in order to use the password in the config file.
2. create mysql configuration file for mysqldump
$> vim .sqlconf
[mysqldump]
user=databaseUser
password=databasePassword
728x90
반응형
'Software Development Engineering > MySQL' 카테고리의 다른 글
[MySQL] Make Superuser (root user) (0) | 2021.02.10 |
---|---|
Restore MySQL Dump (0) | 2021.02.10 |
add new user and set remote access (0) | 2021.02.10 |
[MySQL] Too many connection error를 만났을 때 해결 방법 (max_connection 변경을 통한). 그리고 max_connection이 214 이상으로 설정되지 않는 경우 해결 방법 (0) | 2018.07.01 |