1、打開(kāi)my.ini配置文件,找到mysqld配置項(xiàng),如下:
[mysqld] port=3306
下面添加 skip-grant-tables
之后可跳過(guò)密碼輸入,進(jìn)入命令端;
2、之后更改密碼 輸入:
update mysql.user set password=password("新密碼") where user=root;
3、改完密碼后,刪除my.ini里面添加的 skip-grant-tables
就可以了。
1、打開(kāi)my.ini配置文件,找到mysqld配置項(xiàng),如下:
[mysqld] port=3306
下面添加 skip-grant-tables
之后可跳過(guò)密碼輸入,進(jìn)入命令端;
2、之后更改密碼 輸入:
update mysql.user set password=password("新密碼") where user=root;
3、改完密碼后,刪除my.ini里面添加的 skip-grant-tables
就可以了。