목록전체 글 (96)
웁스교교주의 이야기
나의 업무 특성상 요일을 한글로 출력해야 할 때가 있다이럴 경우 아래와 같은 방법을 응용해서 사용하고 있다.SELECT SUBSTR( _UTF8’월화수목금토일’,WEEKDAY(NOW())+1,1)
mysqldump를 사용하면 자동으로 table lock이 걸린다.그럴 경우 –single-transaction 옵션으로 lock를 안 걸리게 할 수 있다mysqldump -h 아이프 -u 유저 -p패스워드 –single-transaction DB명 > 파일명요렇게 사용하면 된다.
머리가 나뻐서 week 함수를 쓸 때마다사용법이 아리까리 하다..난 머리가 안 좋으므로정리하기로 했다 .ㅎㅎㅎㅎ아래 표 참고요~좀 외우자 ㅎㅎModeFirst day of weekRangeWeek 1 is the first week …0Sunday0-53with a Sunday in this year1Monday0-53with more than 3 days this year2Sunday1-53with a Sunday in this year3Monday1-53with more than 3 days this year4Sunday0-53with more than 3 days this year5Monday0-53with a Monday in this year6Sunday1-53with more than 3 da..
mysql를 replication은 mysql-bin 로그 파일을 읽어서 slave 서버에 update를 하는 방식이다. 근데 mysql-bin 파일에 로그가 안 쌓일 때가 있다. 이런 경우는 DB 접속시 접속 DB명을 안 적었을 때 나타나는 증상이다.
https://downloads.mariadb.org/mariadb/repositories/#mirror=kaist&distro=CentOS&distro_release=centos6-amd64&version=10.1 위에서 repo 정보를 가지고 온다./etc/yum.repo.d/MariaDB.repo 파일을 만들어 아래의 내용을 넣는다.[mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.0/centos6-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1그런다음yum install MareaDB-Galera-server MariaDB-client rsync galera설치 완료..