db
-
mysql 재시작 오류 - datadir 변경프로그래밍/DB 2015. 7. 15. 19:27
참고) mysql 기본 파일/ 디렉토리 위치 로그 위치 - /var/log/mysqld.log conf 파일 위치 - /etc/my.cnf DB 디렉토리(datafile) - /var/lib/mysql 새 서버를 받아서 예전 서버의 DB를 dump하는 중에 이상하게 오래 멈춰 있어서작업을 중지하고 mysql을 실행하니 아래와 같은 에러가 발생하였다. shell> mysql -u root -pEnter password:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) mysqld 서비스를 재시작해보았으나 재시작도 실패. shell> service mysqld restartm..
-
DB connectin error - Authentication with old password no longer supported, use 4.1 style passwords프로그래밍/DB 2015. 5. 5. 16:45
C# 프로그램에서 mysql에 접속하여 사용하고 있는데 어느순간 아래와 같은 메세지가 뜨면서 접속이 안되는 현상이 발생하였습니다. 에러 메세지 : Authentication with old password no longer supported, use 4.1 style passwords에러가 나는 DB 접속문: MySqlConnection conn = new MySqlConnection("SERVER=***.***.com;DATABASE=**;UID=**;PWD=****;"); mysql 4.1 버전부터 PASSWORD() 함수가 기존에는 16비트 해쉬값을 사용하였으니 41비트 해쉬값을 생성하도록 변경되었습니다. 에러 메세지에 따라 접속하는 유저의 암호를 새로운 해쉬값으로 생성하도록 아래와 같이 작업하였습..
-
mysql - 유저 생성과 권한 부여하기프로그래밍/DB 2015. 4. 25. 20:19
참고사이트https://bharath256.wordpress.com/2008/12/08/access-denied-for-user-root-to-database/https://dev.mysql.com/doc/refman/5.0/en/adding-users.htmlhttps://dev.mysql.com/doc/refman/5.1/en/grant.htmlhttps://dev.mysql.com/doc/refman/5.0/en/connection-access.html 우선 사용자를 생성하기 위해 console에서 root로 mysql를 실행한다. mysql -u root -p (암호 입력) 유저 생성 명령은 기본적으로 아래와 같다. CREATE USER 'username'@'host' IDENTIFIED BY '..