-----------------------------------------------------------------------------------
리눅스 환경

1.데몬 실행 중지 

# /usr/local/etc/rc.d/mysql-server.sh stop 
(또는 # killall -9 mysqld ) 

2.인증제외한 MySQL 데몬 실행 

# /usr/local/bin/mysqld_safe --skip-grant & 

3. 비번없이 접속후 mysql DB의 user 테이블에서 root 패스워드 변경 

# /usr/local/bin/mysql
 -u root mysql 

mysql> update user set password=password('new password') where user='root'; 
mysql> flush privileges; 
mysql> quit 

4. 데몬 실행 

# /usr/local/etc/rc.d/mysql-server.sh start
(또는 # /usr/local/bin/safe_mysqld --user=mysql &)


-----------------------------------------------------------------------------------
윈도환경
제어판 - 관리도구 - 서비스로 이동

1. 목록에서 MySQL  정지 버튼으로 서버를 중지

   쉘창에서 MySQL 시작
   c:\..\> mysqld --skip-grant-tables

2. 쉘창 별도로 열고 재접속
   c:\..\> mysql

3. 쿼리로 비번 변경
update user set password=password('new password') where user='root';

4. 데몬 종료
c:\..\> mysqladmin shutdown



'DATABASE' 카테고리의 다른 글

오라클 일정 리턴갯수 랜덤하게 row 가져오기  (1) 2009.12.03
Posted by finewoo
,
linux에 mysql 설치중 오류
./configure 하는중
다음 오류가 날경우 해결
checking for termcap functions library... configure: error: No curses/termcap library found

해당 라이브러리를 찾지 못해 생기는 오류이다.
yum으로 라이브러리를 설치한다.

 #yum -y install ncurses-devel

'Linux' 카테고리의 다른 글

[Linux] CentOS5.3 에 JAVA(JDK) 설치  (0) 2010.02.28
[fedora] Sendmail, dovecot, pop3, sasl  (0) 2009.12.21
Posted by finewoo
,