killall mysqld
/usr/local/mysql/bin/mysqld_safe --skip-grant-tables &
mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 4.0.20-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use mysql
Database changed
mysql> update user set password=password('비밀번호') where user='root';
Query OK, 2 rows affected (0.02 sec)
Rows matched: 2 Changed: 2 Warnings: 0
댓글 2개
서버 최고관리자 권한을 가지고 있는걸로 판단했을때
ssh 로 접근해서 mysql 의 root 를 확 바꿔버립니다.
killall mysqld
/usr/local/mysql/bin/mysqld_safe --skip-grant-tables &
mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 4.0.20-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use mysql
Database changed
mysql> update user set password=password('비밀번호') where user='root';
Query OK, 2 rows affected (0.02 sec)
Rows matched: 2 Changed: 2 Warnings: 0
mysql> exit
Bye
killall mysqld
/usr/local/mysql/bin/mysqld_safe &