mysql 에 대한 질문입니다
작성자 정보
- 조훈래 작성
- 작성일
컨텐츠 정보
- 1,438 조회
- 0 추천
- 목록
본문
지금 호스팅 업무를 맡고 있습니다. 그런데 유닉스를 첨 다뤄 보는거라...ㅜㅜ
물론 책이며 사이트에서 배우고 있습니다.
차근차근히 해야 되는 것인줄 알지만. 당장 급한 업무 때문에 이렇게 글을 올립니다.
문제는 mysql 접속이 안된다는 것입니다.
각 계정들의 mysql 접속이 안됩니다. 물론 관리자가 각 계정들의 패스는 알수는 없지만
그 계정들의 mysql 아이디도 모르니 참으로 난감 합니다. 어떻게 알 수 있는 방법이 없을까요?
p.s : 참 root 패스도 잃어 버려서 사이트 지침서 되로 하다가 서버 재부팅 사태가 있었습니다. ㅜㅜ
root 패스 를 위해 일단 데몬을 죽이고 하는데 잘 되지가 않더라구요...
========================================================================
자답입니다. *^^*
========================================================================
[인용]
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
1. 실행중인 msyql 종료
[killall mysqld [root@kebia_1 bin]#
2. grant-table 미사용모드로 mysql시작
[root@kebia_1 bin]# ./safe_mysqld --skip-grant-tables& [1] 12084 [root@kebia_1 bin]# Starting mysqld daemon with databases from /usr/local/mysql/data [root@kebia_1 bin]# [root@kebia_1 bin]# ./mysql -u root mysql Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 1 to server version: 3.22.24
Type 'help' for help.
mysql>
3. update문으로 root사용자 패스워드 변경
mysql> update user set password=password('12345') where user = 'root'; Query OK, 3 rows affected (0.00 sec) Rows matched: 3 Changed: 3 Warnings: 0
mysql> flush privileges; Query OK, 0 rows affected (0.01 sec)
mysql> exit Bye
4. 실행중인 mysql 다시 종료
[root@kebia_1 bin]# ps -ef | grep mysqld root 12084 11558 0 20:10 pts/2 00:00:00 sh ./safe_mysqld --skip-grant-ta root 12090 12084 0 20:10 pts/2 00:00:00 /usr/local/mysql/libexec/mysqld root 12092 12090 0 20:10 pts/2 00:00:00 /usr/local/mysql/libexec/mysqld root 12093 12092 0 20:10 pts/2 00:00:00 /usr/local/mysql/libexec/mysqld [root@kebia_1 bin]# [root@kebia_1 bin]# killall mysqld mysqld daemon ended [1]+ Done ./safe_mysqld --skip-grant-tables [root@kebia_1 bin]#
5. 일반모드로 Mysql 재시작
[root@kebia_1 bin]# ./safe_mysqld& [1] 12102 [root@kebia_1 bin]# Starting mysqld daemon with databases from /usr/local/mysql/data
[root@kebia_1 bin]# [root@kebia_1 bin]# ps -ef | grep mysql root 12102 11558 0 20:13 pts/2 00:00:00 sh ./safe_mysqld root 12108 12102 0 20:13 pts/2 00:00:00 /usr/local/mysql/libexec/mysqld root 12110 12108 0 20:13 pts/2 00:00:00 /usr/local/mysql/libexec/mysqld root 12111 12110 0 20:13 pts/2 00:00:00 /usr/local/mysql/libexec/mysqld [root@kebia_1 bin]# |
관련자료
-
이전
-
다음