본문 바로가기

잡동/MYSQL11

FUNCTION XXX.old_password does not exist https://mytory.net/archives/3120 [MySQL] PASSWORD() 함수의 결과값이 달라졌을 때 (MySQL 4.1부터 달라짐) MySQL 버전이 4.1대로 넘어오면서 MySQL 함수인 PASSWORD()의 암호화 방법이 달라졌다고 한다. 이전의 PASSWORD() 함수는 16자리 결과물(해시값)을 내놓는 데 반해 새로운 PASSWORD() 함수는 41자리 결과물 mytory.net 없어졌다 함수가 function old_password($password) { $nr=0x50305735; $nr2=0x12345671; $add=7; $charArr = preg_split("//", $password); foreach ($charArr as $char) { if (($char ==.. 2023. 12. 13.
서버이전후 ONLY_FULL_GROUP_BY ONLY_FULL_GROUP_BY 문제 기존 개발자의 쿼리가.... 그렇다고 다바꿀 시간이 없다 지금은 show variables like 'sql_mode' 작성시 현재 적용되어있는 모드가 나온다 vi /etc/my.cnf [mysqld] sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION 설정후 재시 2023. 12. 13.
The server requested authentication method unknown to the client https://stackoverflow.com/questions/43437490/pdo-construct-server-sent-charset-255-unknown-to-the-client-please-rep PDO::__construct(): Server sent charset (255) unknown to the client. Please, report to the developers I'm trying to connect to a MySQL database from Symfony 3 application. But when trying to create MySQL schema from a Symfony console command I get this error: PDO::__construct(): Se.. 2023. 5. 8.
Your password does net satisfy the current policy requirements show variables like 'validate_password%' validate_password.check_user_nameON validate_password.dictionary_file validate_password.length8 validate_password.mixed_case_count1 validate_password.number_count1 validate_password.policyMEDIUM validate_password.special_char_count1 policy가 MEDIUM으로 되어있는것을 확인할수 있다. set global validate_password.policy=LOW; 변경후 진행 2021. 5. 7.
현재시간 기본값설정 : CURRENT_TIMESTAMP 예전버전의경우 datetime형 default값 설정에 NOW()가 사용가능했다 하지만 최근에는 DEFAULT CURRENT_TIMESTAMP 를 사용한다. CURRENT_TIMESTAMP 2020. 5. 15.
DELETE LEFT JOIN 조인을통해서 조인된 결과 모두 삭제 DELETE A,B FROM sample_A A LEFT JOIN SAMPLE_B B ON A.idx = B.a_idx WHERE A.id = '' A값과 B값 설정에 따라서 삭제범위가 변경 가능하다 DELETE A FROM : A삭제 DELETE A,B FROM : A,B둘다삭제 DELETE A FROM : B삭제 조심해서 쓰자 잘못쓰면.. 2020. 2. 18.
시구동 관련 법정동 자료 https://www.code.go.kr/stdcode/regCodeL.do 법정동코드목록조회 - 행정표준코드관리시스템 www.code.go.kr 행정표준코드관리 시스템에서 자료를 받아서 가공 엑셀파일 및 sql파일을 업로드해두었다. 시,구,동을 적절히 쿼리해서 원하는 결과값을 뽑아서 활용함 SELECT dong FROM sigudong WHERE si = ? and gu = ? GROUP BY dong SELECT gu FROM sigudong WHERE si = ? GROUP BY gu 2020. 1. 17.
ROWNUM SELECT @ROWNUM:=@ROWNUM+1 as rownum, ci.* FROM sample sp,(SELECT @ROWNUM:=0) R WHERE 1=1ORDER BY rownum DESC,sp.idx DESC LIMIT 0,10 2020. 1. 13.
lastInsertId 최근등록한 값의 id를 반환 AUTO_INCREMENT에 따라 생성된 최근 ID $db->liastinsertId(); https://www.php.net/manual/en/pdo.lastinsertid.php PHP: PDO::lastInsertId - Manual I think I get a nice solution in Postgres to get the ID using the RETURNING that comes with Postgress since version 8.2. In the example below, I add to my insert clause the "returning" along with the primary key of my table, then after the execute,.. 2019. 8. 14.