-- 아래와 같은 테이블이 있다고 가정해 보자 CREATE TABLE `user` ( `id` VARBINARY(32) NOT NULL DEFAULT '', `name` VARBINARY(64) NOT NULL DEFAULT '', PRIMARY KEY (`id`) USING BTREE ); -- 위 테이블에서 id로 검색을 하고자 한다면 아래 처럼 하면 된다. -- 조건 : WHERE id = '회원ID' -- '회원ID'를 HEX값으로 변환 => c8b8bff84944 -- 변환된 HEX값의 앞에 0x를 붙인다 => 0xc8b8bff84944 SELECT * FROM `user` WHERE `id` = 0xc8b8bff84944
1. FEDERATED 엔진 설치 여부 확인 mysql> show engines; +--------------------+---------+----------------------------------------------------------------+--------------+------+------------+ | Engine | Support | Comment | Transactions | XA | Savepoints | +--------------------+---------+----------------------------------------------------------------+--------------+------+------------+ | FEDERATED | YES | Fe..
$ mysql <
MySQL server has gone away 에러가 발생하는 원인은 아래와 같습니다. - 커넥션이 끊어진 이후에 쿼리를 전송했을 때 - max_allowed_packet 을 초과하는 크기의 쿼리를 전송했을 때 - wait_timeout 을 초과하여 커넥션이 끊어진 경우 - 잘못된 쿼리를 지속적으로 전송하여 서버가 차단한 경우 대부분 MySQL 에 설정된 데이터 전송량이나 전송시간을 초과 하는 경우 발생합니다. 이런경우 MySQL 설정파일인 my.cnf 에서 아래 값을 변경해주시면됩니다. MySQL 기본값은 wait_timeout 8시간, max_allowed_packet 는 16M 입니다. wait_timeout = 28800 max_allowed_packet = 16777216 출처 : https:..
$ mysql -u root Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 8 Server version: 5.5.56-MariaDB MariaDB Server Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> # 데이터베이스 생성 # https://mariadb.com/kb/en/library/create-database/ # CREATE DATAB..
- Total
- Today
- Yesterday