????linux????mysql???????????????????4??linux????mysql?????????????
???????????
????# /etc/init.d/mysql stop
????# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
????# mysql -u root mysql
????mysql> update user set password=password('newpassword') where user='root';
????mysql> flush privileges;
????mysql> quit
????# /etc/init.d/mysql restart
????# mysql -uroot -p
????enter password: <?????????????newpassword>
????mysql>
??????????????????/etc/mysql/debian.cnf?????[client]?????????????????:
????# mysql -udebian-sys-maint -p
????enter password: <????[client]???????>
????mysql> update user set password=password('newpassword') where user='root';
????mysql> flush privileges;
????mysql> quit
????# mysql -uroot -p
????enter password: <?????????????newpassword>
????mysql>
???????????????????????н??й????????????root??????????????????????????λ?п??????£????????????лл????
????# mysql -uroot -p
????enter password: <????/etc/mysql/debian.cnf?????[client]??????????>
??????????????????£?
????1?? ???mysql????
????/etc/init.d/mysqld stop
????2????? –skip-grant-tables??????mysql?????????? ??/etc/inin.d/mysqld??????λ??????????
????vi /etc/init.d/mysqld
????????????????????????????--skip-grant-tables
????/usr/bin/mysqld_safe --skip-grant-tables --datadir="$datadir" --socket="$socketfile"
????--log-error="$errlogfile" --pid-file="$mypidfile"
????????--skip-grant-tables??????????mysql?????????? ?????????????????????mysql??root?????????3?????????mysql????
????/etc/init.d/mysqld start
????4. ???root?????????
????mysql> update mysql.user set password=password??'123456'?? where user=root??
????mysql> flush privileges??
????mysql> quit
????5. ???????mysql????????? ???????????
????mysql
????mysql -u root –p
????????????123456
????6?????mysql????
????/etc/init.d/mysqld stop
????7?? ????????2??????/etc/init.d/mysqld????????????????????--skip-grant-tables???8?????? ???mysql????
????/etc/init.d/mysqld start