DB

    [centos6] mongodb 설치

    [root@localhost yum.repos.d]# yum install mongo-10gen mongo-10gen-server Loaded plugins: fastestmirror Setting up Install Process Loading mirror speeds from cached hostfile * epel: d2lzkl7pfhq30w.cloudfront.net * remi-php70: ftp.riken.jp * remi-php72: ftp.riken.jp * remi-safe: ftp.riken.jp http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/repodata/repomd.xml: [Errno 14] Downloaded more t..

    [mysql] DB / USER / TABLE 생성

    1. DB 생성 mysql> create database 데이터베이스명 Query OK, 1 row affected (0.00 sec) 위 쿼리 하나로 DB 생성은 끝이다. 이제 DB를 생성했으니 권한을 주거나 테이블을 만드는 등의 작업을 해야한다. 2. 계정 생성 CREATE user '계정 아이디'@'localhost' identified by '비밀번호'; mysql> create user 'sjh'@'%' identified by 'test123'; Query OK, 0 rows affected (0.01 sec) 여기까지 하면 단순 계정만 생성한 것이다. SQLyog나 localhost에서 mysql 접속 시 권한이 없으므로 데이터베이스는 보이지 않는다. 3. 권한 부여 GRANT ALL PRI..

    [mysql] general_log

    general log란 MySQL에서 실행되는 전체 쿼리에 대한 로그이며 활성화 시 MySQL 쿼리요청 즉시 파일에 기록됩니다. 위 쿼리로 general log 설정을 확인할 수 있으며, [mysqld] general_log=ON general_log_file = /var/log/general.log my.cnf에서 설정 수정 후 restart 하면 적용 됩니다. 2021-07-08 0:50:40 140182646860544 [ERROR] Error writing file 'mail.log' (errno: 28 "No space left on device") 조금전에 서비스중인 DB가 다운됐고 확인결과 mail.log 라는 파일이 13GB를 차지하였습니다. 위와 같은 로그를 확인해서 임시방편으로 해당 로..