国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

Access denied for user ‘root‘@‘localhost‘ (using password:YES)解決方法

這篇具有很好參考價(jià)值的文章主要介紹了Access denied for user ‘root‘@‘localhost‘ (using password:YES)解決方法。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

之所以想解決并記錄這個(gè)問(wèn)題,不是因?yàn)?Navicat 中的鏈接雙擊打開(kāi)一直報(bào)錯(cuò)(內(nèi)容如標(biāo)題),而是在IDEA打算鏈接數(shù)據(jù)庫(kù)的時(shí)候,報(bào)了同樣的錯(cuò)誤。

百度,csdn每篇文章都寫(xiě)著:你密碼錯(cuò)了,盡管我分明已經(jīng)在建立之初就把密碼登記在小本本上,我對(duì)自己十分自信,但“報(bào)錯(cuò)”顯然對(duì)我沒(méi)什么自信。

按照這篇瀏覽2千卻比某些瀏覽2w+的文章內(nèi)容要好得多的文章:(101條消息) Access denied for user 'root'@'localhost' (using password:YES)解決方法_weixin_30342209的博客-CSDN博客

第1步:管理員的身份運(yùn)行cmd

第2步:

C:\WINDOWS\system32>net stop mysql

access denied for user 'root'@'localhost' (using password: yes),java,intellij-idea,開(kāi)發(fā)語(yǔ)言

第3步:自行切換到你自己的mysql\bin

第4步:

D:\download_3\Mysql_1\mysql\bin>mysqld  --defaults-file="D:\download_3\Mysql_1\mysql\my.ini" --console --skip-grant-tables

access denied for user 'root'@'localhost' (using password: yes),java,intellij-idea,開(kāi)發(fā)語(yǔ)言

第5步:開(kāi)另外一個(gè)cmd,管理員的身份運(yùn)行

\bin>mysql -uroot mysql

access denied for user 'root'@'localhost' (using password: yes),java,intellij-idea,開(kāi)發(fā)語(yǔ)言

打臉了,又找了一篇文章解決上面這個(gè)報(bào)錯(cuò),結(jié)果是讓我啟動(dòng)mysql,”又回到最初的起點(diǎn)~“

access denied for user 'root'@'localhost' (using password: yes),java,intellij-idea,開(kāi)發(fā)語(yǔ)言

當(dāng)然重新找到的文章2寫(xiě)的很好,不過(guò)不是對(duì)應(yīng)我這個(gè)問(wèn)題的

又又找到一篇大佬文章,也是按上面新出現(xiàn)的問(wèn)題去找(套娃開(kāi)始!),先啟動(dòng)Mysql,然后試著登錄,輸入我記本本上的密碼,好極了————————————————

bin>mysql -u root -p

access denied for user 'root'@'localhost' (using password: yes),java,intellij-idea,開(kāi)發(fā)語(yǔ)言

報(bào)錯(cuò)。

由于文章3是大佬作(很明顯),于是我決定重來(lái),跟著操作一遍。

前3步和上面的一模一樣,第4步,關(guān)鍵來(lái)了,大佬指出,Mysql 8.0是用不了上面的方法來(lái)跳過(guò)密碼登錄,而是輸入:

mysqld -console --skip-grant-tables --shared-memory

?access denied for user 'root'@'localhost' (using password: yes),java,intellij-idea,開(kāi)發(fā)語(yǔ)言

?我*,我第一次感覺(jué)我找對(duì)文章了,這文章不僅有碼,還有效果截圖,他真的,我哭死

(101條消息) ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: NO)解決辦法_BugMiaowu2021的博客-CSDN博客_access denied for user

開(kāi)第二個(gè)cmd,管理員的身份運(yùn)行

出現(xiàn)不一致,應(yīng)該是版本不一樣的原因:?

access denied for user 'root'@'localhost' (using password: yes),java,intellij-idea,開(kāi)發(fā)語(yǔ)言

先走了再說(shuō)

登錄,跳過(guò)密碼輸入:

access denied for user 'root'@'localhost' (using password: yes),java,intellij-idea,開(kāi)發(fā)語(yǔ)言

下圖將界面顯示與代碼結(jié)合了:

mysql> use mysql;
//Database changed
mysql> update user set authentication_string='' where user='root';
//Query OK, 1 row affected (0.04 sec)
//Rows matched: 1  Changed: 1  Warnings: 0
//
mysql> quit
//Bye

D:\download_3\Mysql_1\mysql\bin>
D:\download_3\Mysql_1\mysql\bin>net stop mysql
/**沒(méi)有啟動(dòng) mysql 服務(wù)。

請(qǐng)鍵入 NET HELPMSG 3521 以獲得更多的幫助。**/


D:\download_3\Mysql_1\mysql\bin>net start mysql
/**mysql 服務(wù)正在啟動(dòng) .
mysql 服務(wù)已經(jīng)啟動(dòng)成功.**/

D:\download_3\Mysql_1\mysql\bin>mysql -u root -p
Enter password://回車(chē)
/**Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.29 MySQL Community Server - GPL

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

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> ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';
//Query OK, 0 rows affected (0.04 sec)

mysql> quit
//Bye

D:\download_3\Mysql_1\mysql\bin>mysql -u root -p
Enter password: ****//root
/**Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.0.29 MySQL Community Server - GPL

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

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>

省流:將Mysql密碼改為root。

access denied for user 'root'@'localhost' (using password: yes),java,intellij-idea,開(kāi)發(fā)語(yǔ)言

?文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-795612.html

到了這里,關(guān)于Access denied for user ‘root‘@‘localhost‘ (using password:YES)解決方法的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶(hù)投稿,該文觀(guān)點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • pymysql.err.OperationalError: (1045, “Access denied for user ‘root‘@‘localhost‘ (using password: YES

    這個(gè)錯(cuò)誤提示表明在使用PyMySQL連接到MySQL數(shù)據(jù)庫(kù)時(shí),出現(xiàn)了訪(fǎng)問(wèn)被拒絕的問(wèn)題。具體來(lái)說(shuō),錯(cuò)誤代碼是1045,表示訪(fǎng)問(wèn)被拒絕,原因是使用的用戶(hù)名和密碼不正確。 解決這個(gè)問(wèn)題的方法通常包括以下幾個(gè)步驟: 1. **檢查用戶(hù)名和密碼是否正確**:確保在連接數(shù)據(jù)庫(kù)時(shí)使用的用戶(hù)

    2024年03月22日
    瀏覽(20)
  • 報(bào)錯(cuò):java.sql.SQLException: Access denied for user ‘root‘@‘localhost‘ (using password: YES)

    報(bào)錯(cuò):java.sql.SQLException: Access denied for user ‘root‘@‘localhost‘ (using password: YES)

    在使用springboot連接數(shù)據(jù)庫(kù)時(shí),會(huì)使用到y(tǒng)ml或yaml來(lái)設(shè)置DataSource信息,就看你出現(xiàn)以下異常。 提示用戶(hù)訪(fǎng)問(wèn)被拒絕,原因是密碼不正確,但是我們?cè)跈z查時(shí),密碼明明配置的是正確的密碼,原因就在yml或yaml中。 首先找到IDEA中,yaml或yml中,配置數(shù)據(jù)庫(kù)密碼的地方: 因?yàn)閥ml或

    2024年02月03日
    瀏覽(24)
  • 成功解決 java.sql.SQLException: Access denied for user ‘root’@‘localhost’ (using password: YES)

    成功解決 java.sql.SQLException: Access denied for user ‘root’@‘localhost’ (using password: YES)

    今天在用IDE配置JDBC連接MySQL時(shí),一直報(bào)錯(cuò),java.sql.SQLException: Access denied for user ‘root’@‘localhost’ (using password: YES),網(wǎng)上找了很多的解決辦法,現(xiàn)在已成功解決,記錄一下。 重新啟動(dòng)MySQL服務(wù) 右擊此電腦 - 管理 - 服務(wù) - 找到MySQL - 右鍵重新啟動(dòng)。 重新啟動(dòng)MySQL, IDEA還是報(bào)錯(cuò)

    2024年02月04日
    瀏覽(22)
  • 已解決:java.sql.SQLException: Access denied for user ‘root‘@‘localhost‘ (using password: YES)

    已解決:java.sql.SQLException: Access denied for user ‘root‘@‘localhost‘ (using password: YES)

    今天在搞軟測(cè)一個(gè)作業(yè) 要用Tomcat整個(gè)古董項(xiàng)目 因?yàn)橛玫降臇|西都很老 大概就是因?yàn)榕f版本的MySQL服務(wù)器使用mysql_native_password? 但是 這是發(fā)生錯(cuò)誤的主要原因 找到my.ini文件,找到mysqld部分,(如果沒(méi)有就直接增加這句話(huà))將 auth_native_password 設(shè)置為 1 ,新版本的客戶(hù)端仍然能

    2024年04月16日
    瀏覽(28)
  • Linux下報(bào)錯(cuò)MySQL Access denied for user ‘root‘@‘localhost‘ (using password: YES)解決方案

    Linux下報(bào)錯(cuò)MySQL Access denied for user ‘root‘@‘localhost‘ (using password: YES)解決方案

    1.先進(jìn)入root模式 2.進(jìn)入#vim /etc/my.cnf 在[mysqld]后面任意一行添加“skip-grant-tables”用來(lái)跳過(guò)密碼驗(yàn)證的過(guò)程,保存退出 3.systemctl restart mysql#重啟服務(wù) ? 或者 ? ?service mysqld restart#重啟服務(wù) 4.mysql -uroot -p 沒(méi)有密碼可以直接進(jìn)入 5.update mysql.user set authentication_string=PASSWORD(\\\'你的新密碼

    2024年02月09日
    瀏覽(22)
  • mysql連接數(shù)據(jù)庫(kù)報(bào)錯(cuò):1045 - Access denied for user ‘root‘@‘localhost‘ (using password:YES)

    mysql連接數(shù)據(jù)庫(kù)報(bào)錯(cuò):1045 - Access denied for user ‘root‘@‘localhost‘ (using password:YES)

    連接數(shù)據(jù)庫(kù)或者在Navicat連接數(shù)據(jù)庫(kù),報(bào)錯(cuò)信息為:1045 - Access denied for user \\\'root\\\'@\\\'localhost\\\' (using password:YES) 連接數(shù)據(jù)庫(kù)報(bào)錯(cuò)問(wèn)題 一、報(bào)錯(cuò)問(wèn)題提示信息 1.終端連接報(bào)錯(cuò) Navicat連接報(bào)錯(cuò) 二、解決方法: 以管理員身份運(yùn)行cmd; 2.cd到mysql下的bin目錄; 3.停止mysql服務(wù) 4.mysql權(quán)限屏蔽

    2024年02月12日
    瀏覽(33)
  • java.sql.SQLException: Access denied for user ‘root‘@‘localhost‘ (using password: YES)報(bào)錯(cuò)原因

    java.sql.SQLException: Access denied for user ‘root‘@‘localhost‘ (using password: YES)報(bào)錯(cuò)原因

    1.第一個(gè):用戶(hù)名和密碼不匹配,或者是在連接池里多打了空格之類(lèi)的 就是配置文件的問(wèn)題; 2.第二個(gè):可能是用戶(hù)的權(quán)限不夠,給他添加權(quán)限; 授予權(quán)限 -- grant all privileges on databasename.tablename to \\\'user\\\'@\\\'host\\\' identified by \\\'password\\\'; -- 授予myuser用戶(hù)全局級(jí)全部權(quán)限: GRANT ALL PRI

    2024年02月06日
    瀏覽(23)
  • 解決mysql:ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: NO/YES)

    有時(shí)候我們登錄Mysql輸入密碼的時(shí)候,會(huì)出現(xiàn)這種情況 mysql -u root -p? Enter Password \\\'密碼\\\' 錯(cuò)誤:ERROR 1045 (28000): Access denied for user \\\'root\\\'@\\\'localhost\\\' (using password: YES) 或者:錯(cuò)誤:ERROR 1045 (28000): Access denied for user \\\'root\\\'@\\\'localhost\\\' (using password: NO) 修改my.in/my.cnf配置文件 進(jìn)入mysql安裝目錄

    2024年02月08日
    瀏覽(22)
  • 【java.sql.SQLException: Access denied for user ‘root‘@‘localhost‘ (using password: YES)】異常問(wèn)題及解決

    【java.sql.SQLException: Access denied for user ‘root‘@‘localhost‘ (using password: YES)】異常問(wèn)題及解決

    自學(xué)最新版本的 SpringCloud alibaba,將以前的知識(shí)進(jìn)行鞏固,并了解一下新版本的巨大更新。在數(shù)據(jù)庫(kù)方面沒(méi)有牽扯Mybatis,而是用的原始的Hibernat,在學(xué)習(xí)過(guò)程中,在碼完練習(xí)代碼以后,運(yùn)行代碼的時(shí)候,出現(xiàn)了這樣一個(gè)【java.sql.SQLException: Access denied for user ‘root’@‘localhost’

    2024年02月04日
    瀏覽(31)
  • Mysql 1045 Access denied for user ‘root‘@‘localhost‘ (using password: YES/NO)個(gè)人解決方法 分享一下

    Mysql 1045 Access denied for user ‘root‘@‘localhost‘ (using password: YES/NO)個(gè)人解決方法 分享一下

    Mysql 1045 Access denied for user ‘root‘@‘localhost‘ (using password: YES/NO) 看了很多篇文章都沒(méi)解決, 下面是我個(gè)人解決方法 分享一下 Access denied(拒絕訪(fǎng)問(wèn)) using password:NO (沒(méi)有就輸出NO) Access denied(拒絕訪(fǎng)問(wèn)) using password:YES (輸入了就表示YES) CTRL+ALT+DELETE 打開(kāi)任務(wù)管理器,切換到“

    2023年04月19日
    瀏覽(25)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包