很郁闷,MYSQL装完了,PHPMyadmin也装完了,发现不知道密码。
。
1 2 3 |
/etc/init.d/mysql stop mysqld_safe --user=mysql --skip-grant-tables --skip-networking & mysql -u root mysql |
进入mysql命令界面
1 2 3 |
mysql> USE mysql ;
|
重启mysql
1 2 |
/etc/init.d/mysql restart mysql -uroot -p |
比如说,旧密码是“12345”,新密码是“nowamagic”,执行以下命令:
|
mysqladmin -u root -p '12345' password 'nowamagic' |