再開啟另外乙個cmd視窗,同樣是進入到mysql的bin目錄,如果已經將mysql的bin目錄配置到環境變數中,可以直接輸入mysql命令
c:\mysql-5.7.19-winx64\bin>mysql
welcome to the mysql monitor. commands end with ; or \g.
your mysql connection id is 3
server version: 5.7.19 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> use mysql;
database changed
mysql>update user set authentication_string=password('123456') where user='root';
query ok, 1 row affected, 1 warning (0.00 sec)
rows matched: 1 changed: 1 warnings: 1
mysql>flush privileges;
query ok, 0 rows affected (0.01 sec)
mysql>
執行完成之後退出
忘記mysql密碼
如果 mysql 正在執行,首先殺之 killall term mysqld。啟動 mysql bin safe mysqld skip grant tables 就可以不需要密碼就進入 mysql 了。然後就是 use mysql update user set password password...
MYSQL密碼忘記
1.先以root使用者登入系統 2.關閉mysql服務或程序 service mysql d stop killall mysqld 3.特權啟動mysqld safe skip grant tables 4.然後可以不需要密碼進入mysql mysql u root p 要求輸入密碼時直接回車即可...
mysql忘記密碼
mysql有時候忘記密碼了怎麼辦?我給出案例和說明 一下就解決了 windows下的實際操作如下 1.關閉正在執行的mysql。2.開啟dos視窗,轉到mysql bin目錄。3.輸入mysqld skip grant tables回車。如果沒有出現提示資訊,那就對了。4.再開乙個dos視窗 因為剛...