# DataBase/Mysql(MariaDB)2015. 8. 16. 06:14configure: error: no acceptable C compiler found in $PATH

[root@localhost mysql]# ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --sysconfdir=/etc --without-debug --with-charset=euckr --with-extra-charsets=all --with-plugins=innobase checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for a BSD-compatible install... /usr/bin..

mysql charset utf8 셋팅
# DataBase/Mysql(MariaDB)2015. 8. 16. 06:13mysql charset utf8 셋팅

1. etc/my.cnf (또는 my.ini) 에서 캐릭터셋 수정 [client] #password = your_password default-character-set=utf8 [mysqld] init_connect=SET collation_connection = utf8_general_ci init_connect=SET NAMES utf8 default-character-set=utf8 character-set-server=utf8 collation-server=utf8_general_ci [mysql] default-character-set=utf8 2. 환경변수를 모두 수정후 mysql 서비스 재시작 3. mysql에서 캐릭터셋 확인 # mysql Type 'help;' or '\h' for hel..

mysql select query 결과 파일 저장
# DataBase/Mysql(MariaDB)2015. 8. 16. 06:12mysql select query 결과 파일 저장

SELECT col1, col1, col3 INTO OUTFILE "~/outfile.csv" FIELDS TERMINATED BY ',' FROM mem_main; INTO OUTFILE "file name" : select 의 결과를 저장할 파일을 지정함 파일의 경로를 명시하지 않을 경우 default 로 mysql 설치 디렉토리에 저장된다. FIELDS TERMINATED BY '구분자': 각 columns 을 구분할 구분자를 지정함 (*.csv 로 저장하여 엑셀에서 파일을 읽기를 원한다면 공백 또는 , 로 지정해야 함)

mysql dump 옵션정리
# DataBase/Mysql(MariaDB)2015. 8. 16. 06:12mysql dump 옵션정리

덤프시 가급적 characterset 확인 후 진행 # 쿼리문 덤프 mysqldump -u 사용자명 디비명 -p 테이블명 -w'no>0' 1. 특정 db의 특정 table에서 원하는 값만 덤프받기 # edu라는 디비에 a,b,c라는 테이블이 있다. 여기서 a라는 테이블에서 no가 7번이상이고 10번 # 이하인 값만 덤프를 받고자 한다. 어떻게 하겠는가? # 여기서 사용되는 옵션은 -w 이다.그럼 위 질문의 sql문은 아래와 같다 mysqldump -u mysql_admin -p edu a -w'no=>7 and no=

image