mysql忘記密碼的解決方案:
1.在作業系統windows作業系統,xp或win7.中進入如下目錄:
c:\users\administrator>cd c:\program files\mysql\mysql server 5.5\bin
2.停止mysql服務
c:\program files\mysql\mysql server 5.5\bin>net stop mysql
mysql 服務正在停止.
mysql 服務已成功停止。
3.跳過授權給表
c:\program files\mysql\mysql server 5.5\bin>mysqld --skip-grant-tables
你會看到視窗游標在下一行的第乙個位置閃爍,這說明已經啟動了,不需要管。
4. 新建乙個命令列視窗同樣進入到e:\mysql5.5\bin目錄,啟動mysql
c:\program files\mysql\mysql server 5.5\bin>mysql
welcome to the mysql monitor. commands end with ; or \g.
your mysql connection id is 1
server version: 5.5.36 mysql community server (gpl)
oracle is a registered trademark of oracle corporation and/or its
affiliates. other names may be trademarks of their respective
owners.
type 'help;' or '\h' for help. type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------+
4 rows in set (0.00 sec)
5.選擇mysql資料庫
mysql> use mysql;
database changed
mysql> update user set password=password('root') where user='root';
query ok, 2 rows affected (0.00 sec)
rows matched: 2 changed: 2 warnings: 0
mysql> flush privileges;
query ok, 0 rows affected (0.01 sec)
6.退出mysql終端:
mysql> quit
bye
7.看看那任務管理器中是否有mysqld.exe程序,如有,kill .
9.啟動mysql伺服器
c:\program files\mysql\mysql server 5.5\bin>net start mysql
mysql 服務正在啟動 .
mysql 服務已經啟動成功。
10.登入mysql伺服器
c:\program files\mysql\mysql server 5.5\bin>mysql -u root -p root
welcome to the mysql monitor. commands end with ; or \g.
your mysql connection id is 1
server version: 5.5.36 mysql community server (gpl)
oracle is a registered trademark of oracle corporation and/or its
affiliates. other names may be trademarks of their respective
owners.
type 'help;' or '\h' for help. type '\c' to clear the current input statement.
mysql>
總結一下:就按照如上的10步驟,往下走就ok,祝你成功。 MySQL忘記密碼解決方案
在windows下 開啟命令列視窗,停止mysql服務 net stop mysql 到mysql的安裝路徑啟動mysql,在bin目錄下使用mysqld nt.exe啟動,在命令列視窗執行 mysqld nt skip grant tables 然後另外開啟乙個命入令行視窗,執行mysql,此時無...
Mysql忘記密碼解決方案
在windows下 開啟命令列視窗,停止mysql服務 net stop mysql 到mysql的安裝路徑啟動mysql,在bin目錄下使用mysqld nt.exe啟動,在命令列視窗執行 mysqld nt skip grant tables 然後另外開啟乙個命入令行視窗,執行mysql,此時無...
Mysql忘記密碼解決方案
一 windows系統 1 停止mysql服務,cmd開啟dos視窗,輸入 net stop mysql 2 在cmd命令列視窗,進入mysql安裝目錄 比如d program files mysql advanced 5.6.25 winx64 bin 示範命令 輸入 d 回車,輸入cd d pr...