DB에 접속 후
[비번변경]
mysql > set password=password("바꿀 비밀번호");
mysql > set password=password("바꿀 비밀번호");
[분실시]
# cd /usr/local/mysql/bin //mysql이 설치된 디렉토리의 bin
# killall mysqld
# ./safe_mysqld --skip-grant &
# mysql
mysql > USE mysql;
mysql > UPDATE user SET Password=PASSWORD('패스워드') WHERE user='root';
mysql > FLUSH PRIVILEGES;
mysql > quit
# mysqld restart
# cd /usr/local/mysql/bin //mysql이 설치된 디렉토리의 bin
# killall mysqld
# ./safe_mysqld --skip-grant &
# mysql
mysql > USE mysql;
mysql > UPDATE user SET Password=PASSWORD('패스워드') WHERE user='root';
mysql > FLUSH PRIVILEGES;
mysql > quit
# mysqld restart