MY-SQL

  • Touch and Swipe
    MY-SQL

    17 데이터베이스 생성 유저생성 권한 부여

      create user `ateama`@`localhost` identified by '12341234';     create database ateama CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;   grant all privileg…

  • Touch and Swipe
    MY-SQL

    9 mysql + ibatis 사용시, mysql connector 에러 해결 방법

     Tomcat 에서 jndi 등으로MySQL Connection 세팅을 하고 쓰다보면 가끔. java.io.EOFException: Can not read response from server.Expected to read 4 bytes, read 0 bytes before…

  • Touch and Swipe
    MY-SQL

    5 docker 로 mariadb 설치

     [Windows 10] Docker 설치 완벽 가이드(Home 포함) #cmd 에서 mariadb docker 받기#docker pull mariadb#docker image ls #mariadb 컨테이너 임의포트 3308포토를 통해 3…

  • Touch and Swipe
    MY-SQL

    5 제약조건으로 테이블 컬럼변경이 안될때 제약조건 확인 및 추가 삭제하기 - mysql

    show create table ci_board_reply;이렇게 하면 특정 테이블에 대한 생성정보가 나온다. 여기서 제약 조건을 볼수 있다.CREATE TABLE `ci_board_reply` ( `rno` int(10) NOT NU…

  • Touch and Swipe
    MY-SQL

    5 MariaDB 버전과 설치할 OS에 따라 설치방법

     MariaDB 공식 페이지에 가면 MariaDB 버전과 설치할 OS에 따라 설치방법이 안내되어있다. Ubuntu 14.04에 MariaDB를 MariaDB 10.1 버전을 설치하기 위…

  • Touch and Swipe
    MY-SQL

    4 GeoLite2를 mySQL 데이터베이스에 설치 방법

     GeoLite2를 mySQL 데이터베이스에 설치하십시오.어떤 프록시 서버 의 유용성을 결정할 때 여러 번 , 그 프록시 서버의 위치를 ​​알아야…

  • Touch and Swipe
    MY-SQL

    4 mysql 이전페이지 다음페이지 목록 출력 쿼리

      1)심플 쿼리 select * from tbl_board where ( bno = IFNULL((select min(bno) from tbl_board where bno > 134),0) or bno = IFNULL((select max(bno) from tbl_board where bno = 134…

  • Touch and Swipe
    MY-SQL

    4 mysql 몇분전 몇시간전, 며칠전으로 표시

        SELECT tb.* , case WHEN TIMEDIFF(NOW(), tb.createdDate) < 1 THEN concat(MINUTE(TIMEDIFF(NOW(), tb.createdDate)), ' 분전') WHEN TIMEDIFF(NOW(), tb.cr…

  • Touch and Swipe
    MY-SQL

    4 mysql query browser

    mysql query browser 요즘 mysql workbench 보다 예전 gui tool이 더 쓰기 편한 것 같다;;    http://dev.mysql.com/downloads/gui-tools/5.0.html   링크를 겨…

  • Touch and Swipe
    MY-SQL

    4 [DB] 자료테이블을 통해 테이블 구성하기(MySQL 이용)

    Readiz Read everything in the world easily. http://readiz.com/   MySQL을 사용하여 DB생성하기  테이블만 보고!       아래에 3개의 테이…

  • Touch and Swipe
    MY-SQL

    mysql 행번호 붙이는 간단한 방법

     row_number() over(order by  '정렬하고싶은컬럼값'  desc )  as  num 셀렉트절에 넣는다. row_number() over(order by id desc) as num  …

  • Touch and Swipe
    MY-SQL

    mysql 몇분전 몇시간전, 며칠전으로 표시

        SELECT tb.* , case WHEN TIMEDIFF(NOW(), tb.createdDate) < 1 THEN concat(MINUTE(TIMEDIFF(NOW(), tb.createdDate)), ' 분전') WHEN TIMEDIFF(NOW(), tb.cr…

  • Touch and Swipe
    MY-SQL

    mysql 이전페이지 다음페이지 목록 출력 쿼리

      1)심플 쿼리 select * from tbl_board where ( bno = IFNULL((select min(bno) from tbl_board where bno > 134),0) or bno = IFNULL((select max(bno) from tbl_board where bno = 134…

  • Touch and Swipe
    MY-SQL

    mysql 저장프로시저 사용 - 좋아요 개발하기

      -- 좋아요 테이블 CREATE TABLE `TBL_LIKE` ( `NTT_ID` decimal(20,0) NOT NULL COMMENT '게시물ID', `BBS_ID` char(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '…

  • Touch and Swipe
    MY-SQL

    docker 로 mariadb 설치

     [Windows 10] Docker 설치 완벽 가이드(Home 포함) #cmd 에서 mariadb docker 받기#docker pull mariadb#docker image ls #mariadb 컨테이너 임의포트 3308포토를 통해 3…

  • Touch and Swipe
    MY-SQL

    MySQL 퍼센트 계산하기

      123456789SET @totalCount := (SELECT count(fid) FROM files); SELECT   f.file_type,  @totalCount AS totalCount , count(fid) AS count ,   ROUND((count(…

  • Touch and Swipe
    MY-SQL

    MariaDB 버전과 설치할 OS에 따라 설치방법

      MariaDB를 설치하기 전에 ubuntu에 repository를 설정하기 위해 아래 링크의 페이지를 열어줍니다. https://downloads.mariadb.org/mariadb/repositories 아…

  • Touch and Swipe
    MY-SQL

    MariaDB 버전과 설치할 OS에 따라 설치방법

     MariaDB 공식 페이지에 가면 MariaDB 버전과 설치할 OS에 따라 설치방법이 안내되어있다. Ubuntu 14.04에 MariaDB를 MariaDB 10.1 버전을 설치하기 위…

  • Touch and Swipe
    MY-SQL

    mysql + ibatis 사용시, mysql connector 에러 해결 방법

     Tomcat 에서 jndi 등으로MySQL Connection 세팅을 하고 쓰다보면 가끔. java.io.EOFException: Can not read response from server.Expected to read 4 bytes, read 0 bytes before…

  • Touch and Swipe
    MY-SQL

    GeoLite2를 mySQL 데이터베이스에 설치 방법

     GeoLite2를 mySQL 데이터베이스에 설치하십시오.어떤 프록시 서버 의 유용성을 결정할 때 여러 번 , 그 프록시 서버의 위치를 ​​알아야…