일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- html
- child theme
- https
- LetsEncrypt
- vscode
- Fail2ban
- non-www
- home page
- mysql
- Xdebug
- git pull
- Linux
- Certbot
- Apache
- SSL
- MariaDB
- root
- Mac
- launch.json
- Google Cloud
- crontab
- Liniux
- new user
- front page
- centos
- wordpress
- php
- DOM Parser
- CentOS7
- 구글 클라우드
- Today
- Total
목록Software Development Engineering/MySQL (5)
between 0 and 1
mysql> GRANT ALL PRIVILEGES ON *.* TO myuser@localhost WITH GRANT OPTION; or mysql> GRANT ALL PRIVILEGES ON *.* TO myuser@localhost IDENTIFIED BY 'password' WITH GRANT OPTION; to make super(root) user, "WITH GRANT OPTION" should be applied.
Step 1. Create Database mysql> create database new_database; Step 2. Restore MySQL Dump $ mysql -u [user] -p [new_database] < [filename].sql make sure to include [new_database] and [filename] in the path.
for internal access (localhost) CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost'; FLUSH PRIVILEGES; for remote access CREATE USER 'newuser'@'%' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'%'; FLUSH PRIVILEGES;
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 c..
웹사이트/데이터 베이스를 운영하다보면, 쉽게 마주치게 되는 에러가 있는데, 바로 "Too many connection error" 이다. 이건 MySQL에 허용 동시접속자수가 다 차서, 더 이상 접속할 수 없다는 의미인데. 이 경우, 접속이 끊어지지 않는다면 영원히 MySQL에 접속이 안될 것이며, 서비스는 운영 불가하게 될 것이다. MySQL에서 동시접속자수는 max_connection 변수로 설정할 수 있다. max_connection을 변경하는 방법은 크게 2가지가 있다. 1. MySQL에 접속하여 설정값을 변경해주는 방법2. 환경설정파일 (ex. my.cnf) 에서 변경해주는 방법 1번의 경우 - 변경을 해주면 바로 적용이 되지만, - MySQL을 다시 실행하게 되면 환경설정파일의 기본값으로 다시..