분류 전체보기 (19) 썸네일형 리스트형 mysql select count, left join, 다중 select, 서브쿼리, Group by, SELECT 후 DELETE [목적] 등록된 회선 수와 해지 상태의 회선 수가 일치하는 경우 데이터 삭제 SELECT D.CompId, D.Cntentry FROM (SELECT D.CompId, count(D.EntryId) as CntEntry FROM BP_PRODENTRY D GROUP BY D.CompId ) D LEFT JOIN (SELECT C.CompId, COUNT(case when C.ProgState=4 then 1 end) as status FROM BP_PRODENTRY C GROUP BY C.CompId ) as C ON D.CompId = C.CompId WHERE C.status >= D.Cntentry GROUP BY D.CompId DELETE FROM BP_PRODENTRY WHERE CompId .. 외부 접속 허용, 권한 부여 문제 Access denied for user 'userid'@'ip' (using password: YES)} 2021.11.19 [에러 메세지] Access denied for user 'userid'@'ip' (using password: YES)} 1. mysql root 접속 mysql -uroot -p 2. 외부 접속 권한 허용해주기 mysql> grant all privileges on *.* to ‘userid’@‘허용ip’ identified by ‘password’; 3. 외부 원격 접속 테스트 mysql -h192.168.xx.xxx -uuserid -p CentOS7에 MariaDB 10.6 설치하기 (1) 2021.08.18 서버 들어올 때 OS 설치는 되어 들어와서 DB 설치만 진행했다. 이전엔 MariaDB 5.5를 설치했다면 이번엔 최신버전 10.6 설치 진행 1. repo에 다운로드 정보 등록 [root@ ~]# vi /etc/yum.repos.d/MariaDB.repo [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.6/centos7-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 2. 설치 [root@ ~]# yum install MariaDB-server MariaDB-client 설치 과정에서 나오는 y/n 중에 모두 y 입력 3. 설치 확인 [root@ ~].. [MariaDB] Illegal mix of collations (euckr_korean_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation 'like' [Error Message] Illegal mix of collations (euckr_korean_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation 'like' [해결] 기존 서버와 다르게 세팅되어 있는 부분들을 찾아보았다. 정상 서버의 경우 MariaDB [(none)]> show variables like 'c%'; +--------------------------+----------------------------+ | Variable_name | Value | +--------------------------+----------------------------+ | character_set_client | euckr | | charact.. ERROR 1045 (28000): Access denied for user '-root'@'localhost' (using password: YES) 자꾸 비밀번호 틀렸다고 해서 빡치던 와중 이것 저것 해봐도 안되다가 방법을 찾아냄 using password: NO 가 뜨도록 패스워드 입력하지 말고 엔터를 치라는 글을 발견 그대로 실행해봄 [root@localhost init.d]# /usr/bin/mysql -u -root -p Enter password: ERROR 1045 (28000): Access denied for user '-root'@'localhost' (using password: YES) [root@localhost init.d]# /usr/bin/mysql -u -root -p Enter password: ERROR 1045 (28000): Access denied for user '-root'@'localhost' (using .. MariaDB5.5 설치 과정 (1) root password 설정 DB 설치가 완료되었으면 실행 [root@localhost init.d]# /etc/init.d/mysql start Starting MariaDB SUCCESS! 서비스 확인 [root@localhost init.d]# netstat -an | grep 3306 tcp 0 0 :::3306 :::* LISTEN root 패스워드 설정 [root@localhost init.d]# mysqladmin -u root password New password: Confirm new password: root로 mysql 접속 [root@localhost init.d]# /usr/bin/mysql -u root -p Enter password: Welcome to the MariaDB monitor. Comman.. CentOS6 에서 MariaDB 설치 시 NOKEY, RPM is not installed 오류 [환경] CentOS release 6.10 (Final) [Error Message] warning: rpmts_HdrFromFdno: Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY Public key for MariaDB-client-5.5.68-1.el6.x86_64.rpm is not installed (1) Error Message 1 [root@localhost ~]# yum install MariaDB-server Loaded plugins: fastestmirror Setting up Install Process Loading mirror speeds from cached hostfile base | 3.7 kB 00:00 extras | 3.. CentOS 6 yum 오류 해결 방법 [Error Message] (1) YumRepo Error: All mirror URLs are not using ftp, http[s] or file. Eg. Invalid release/repo/arch combination/ removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt Error: Cannot find a valid baseurl for repo: base (2) removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/extras/mirrorlist.txt Error: Cannot find a valid baseurl for.. 이전 1 2 3 다음