日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

mysql denide_MYSQL 出现Error1045 access denied 的解决方法

發(fā)布時(shí)間:2023/12/15 数据库 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 mysql denide_MYSQL 出现Error1045 access denied 的解决方法 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

1. 管理員登陸系統(tǒng),停止 MySQL 服務(wù)或者結(jié)束 MySQL 進(jìn)程。

2. 啟動(dòng) WINDOWS 的命令行窗口(即通常的 DOS 窗口:運(yùn)行cmd),切換到你的 “MySQL\bin” 目錄下。

例如我的是 “D:\Program Files\MySQL\MySQL Server 5.2\bin”,然后執(zhí)行下面的粗體的命令:(注意你的 “my.ini” 位置)

C:\Documents and Settings\Administrator>d:

C:\Documents and Settings\Administrator>cd D:\Program Files\MySQL\MySQL Server 5.5\bin

D:\Program Files\MySQL\MySQL Server 5.5\bin>mysqld --defaults-file="D:\Program Files\MySQL\MySQL Server 5.5\my.ini" --console --skip-grant-tables

100608 9:04:12 InnoDB: Started; log sequence number 0 46409

100608 9:04:12 [Note] mysqld: ready for connections.

Version: '5.5.0-falcon-alpha-community' socket: '' port: 3306 MySQL Community

Server (GPL)

100608 9:06:57 [Warning] Found invalid password for user: 'root@localhost'; Ign

oring user

只要出現(xiàn)上面信息,就說明 MySQL 已經(jīng)起來了。

3. 不關(guān)閉此命令行窗口,重新打開一個(gè)命令行窗口,同樣切到 “MySQL\bin” 目錄下,然后執(zhí)行下面的粗體的命令:

C:\Documents and Settings\Administrator>d:

C:\Documents and Settings\Administrator>cd D:\Program Files\MySQL\MySQL Server 5.5\bin

D:\Program Files\MySQL\MySQL Server 5.5\bin>mysql -u root mysql

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 1

Server version: 5.5.0-falcon-alpha-community MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

然后,就是重新設(shè)置密碼了!

mysql> UPDATE user SET Password=PASSWORD('root') where USER='root';

Query OK, 1 row affected (0.00 sec)

Rows matched: 1 Changed: 1 Warnings: 0

mysql> FLUSH PRIVILEGES;

Query OK, 0 rows affected (0.00 sec)

mysql> quit

Bye

4. 好了到此步,可以關(guān)閉第一個(gè) DOS 窗口了(關(guān)閉服務(wù))。打開系統(tǒng)服務(wù)控制窗口(控制面板--管理工具--服務(wù)),啟動(dòng) MySQL 服務(wù)

5. 在剩下的第二個(gè) DOS 窗口中,用新的 ROOT 密碼連接 MySQL。

D:\Program Files\MySQL\MySQL Server 5.5\bin>mysql -u root -p

Enter password: ****

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 1

Server version: 5.5.0-falcon-alpha-community-nt MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> quit

Bye

至此,系統(tǒng)恢復(fù) ROOT 用戶管理權(quán)限完成,就是管理員密碼的問題.

總結(jié)

以上是生活随笔為你收集整理的mysql denide_MYSQL 出现Error1045 access denied 的解决方法的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。