1.关闭原来的数据库服务
2.在mysql/bin目录下运行mysqld -u root --skip-grant-tables
(windows下可以用mysqld-nt)
3.[root]#mysql
mysql>use mysql;
mysql>update user set password=password('newpassword') where user='root';
4.运行mysqladmin reload 或者关闭刚才的mysqld进程正常启动数据库
2.在mysql/bin目录下运行mysqld -u root --skip-grant-tables
(windows下可以用mysqld-nt)
3.[root]#mysql
mysql>use mysql;
mysql>update user set password=password('newpassword') where user='root';
4.运行mysqladmin reload 或者关闭刚才的mysqld进程正常启动数据库
c:\mysql\bin>mysql
登录不了啊~