久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

MySqlException:用戶“altjenb"@“l(fā)ocalhost"的訪問

MySqlException: Access denied for user #39;altjenb#39;@#39;localhost#39; (using password: YES)(MySqlException:用戶“altjenb@“l(fā)ocalhost的訪問被拒絕(使用密碼:YES))
本文介紹了MySqlException:用戶“altjenb"@“l(fā)ocalhost"的訪問被拒絕(使用密碼:YES)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

限時送ChatGPT賬號..

我不知道為什么我會得到這個,用戶,altjenb 在 mysql 數(shù)據(jù)庫中有完全訪問權(quán)限,但我仍然收到同樣的錯誤.我嘗試在 mysql8.db4free.net 和 db4free.net 上使用在線數(shù)據(jù)庫并得到相同的錯誤.在 localhost (xampp) 中嘗試過,仍然是同樣的錯誤..

I dont know why am I getting this, user, altjenb has full access in the mysql db but I still keep getting the same error. I tried to use online db at mysql8.db4free.net and db4free.net and got the same error. tried in localhost (xampp) and still the same error..

MySqlException: 用戶 'altjenb'@'localhost' 的訪問被拒絕(使用密碼:是)

MySqlException: Access denied for user 'altjenb'@'localhost' (using password: YES)

這是連接字符串

MySqlConnection connectionstring = new MySqlConnection("Server=localhost; port= 3306; Database=battlehunt_db; UserId=altjenb; Password=egrgeaf;");

我手動授予用戶完全訪問權(quán)限.但還是什么都沒有我試圖通過

I manually granted full access to the user. but still nothing, I tried to give access with

GRANT ALL PRIVILEGES ON * battlehunt_db. * TO 'altjenb'@'localhost';

但還是一樣的錯誤.

但是當(dāng)我將用戶 ID 更改為 root 并且沒有密碼時.它連接到數(shù)據(jù)庫 .. 看起來它沒有收到用戶名.. 我嘗試添加一個未在(例如 egwetr)中注冊的隨機用戶名,但它仍然顯示相同的錯誤..

but when I change the userID to root and no password. it connects to the db.. it looks like it doesnt receive the user name.. I tried to add a random user name who is not registered in (eg. egwetr) and still it showed the same error..

我該如何解決這個問題?

how can I fix this?

我正在嘗試將 unity3d 5 與 mysql db 連接

Im trying to connect unity3d 5 with mysql db

推薦答案

好的,解釋我對這個問題的評論.

Ok, Explaining my comment on the question.

假設(shè)該用戶的密碼是正確的錯誤信息:

Assuming that the password for that user is correct the Error message:

MySqlException: Access denied for user 'altjenb'@'localhost' (using password: YES)

這可能意味著用戶沒有連接到服務(wù)器'localhost'的權(quán)限

It can mean that the user does not have permision to connect to the server 'localhost'

在用戶表中,您可以看到哪些主機具有權(quán)限:

In the user table you can see to what host has permission:

---------------------------
   user     |    host     |
---------------------------
user1       |   localhost |
user1       |   127.0.0.1 |
user2       |   127.0.0.1 |

在這個例子中,user1 可以連接到 localhost 和 127.0.0.1 所以:

in this example, user1 can connect to localhost and 127.0.0.1 so:

new MySqlConnection("Server=localhost; port= 3306; Database=battlehunt_db; UserId=user1; Password=egrgeaf;");
new MySqlConnection("Server=127.0.0.1; port= 3306; Database=battlehunt_db; UserId=user1; Password=whatever;");

兩個連接都有效

但用戶 2 只能訪問 127.0.0.1

But user 2 only has access to 127.0.0.1

所以:

new MySqlConnection("Server=localhost; port= 3306; Database=battlehunt_db; UserId=user2; Password=egrgeaf;");

會失敗,因為它試圖連接到本地主機"

will fail because it's trying to connect to 'localhost'

new MySqlConnection("Server=127.0.0.1; port= 3306; Database=battlehunt_db; UserId=user2; Password=whatever;");

會成功.

在Mysql的用戶表中查看哪個主機可以訪問用戶'altjenb',如果'altjenb'沒有主機'localhost',您可以添加它或?qū)⑦B接字符串更改為用戶擁有的主機之一.

Check in the user table of Mysql to what host has access the user 'altjenb', if 'altjenb' does not have the host 'localhost' you can add it or change the connection string to one of the hosts the user has.

希望對您有所幫助

這篇關(guān)于MySqlException:用戶“altjenb"@“l(fā)ocalhost"的訪問被拒絕(使用密碼:YES)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Typeorm Does not return all data(Typeorm 不返回所有數(shù)據(jù))
MySQL return extra records when using a long type number to filter varchar type(MySQL在使用長類型數(shù)字過濾varchar類型時返回額外記錄)
MySQL Error #1071 - Specified key was too long; max key length is 767 bytes(MySQL 錯誤 #1071 - 指定的鍵太長;最大密鑰長度為 767 字節(jié))
MySQL command-line table column width with utf8(MySQL命令行表列寬與utf8)
Python unicode encoding issue(Python unicode 編碼問題)
Create a MySQL stored function with a dynamic number of arguments(創(chuàng)建一個帶有動態(tài)參數(shù)數(shù)量的 MySQL 存儲函數(shù))
主站蜘蛛池模板: 福利av在线 | 日韩理论在线 | 黄色av观看 | www.亚洲天堂| 中文字幕日韩高清 | 欧美日韩亚洲天堂 | 中文字幕国产一区 | 亚洲国产成人av | 狠狠干狠狠操 | xxxxx国产| 欧美日韩一区在线观看 | 欧美日韩精品一区二区 | 午夜激情小视频 | 国产成人精品一区二区三区在线 | 激情丁香 | 99精品久久久久久中文字幕 | 国产成人精品一区二区 | 97久久精品人人澡人人爽 | av一级在线| 躁躁躁日日躁 | 久久久久久国产精品 | 日韩一区二区三区四区 | 国产高清在线观看 | 欧美精品亚洲 | 在线观看一区 | 日韩精品视频在线免费观看 | www.av在线 | 一区二区国产精品 | 国产精品视频一区二区三区 | 欧美综合一区二区三区 | 秋霞啪啪片 | 国产精品一品二区三区的使用体验 | 亚洲一区二区在线视频 | 在线播放一区 | 欧美啪啪网| 九九热精品在线 | www.久草.com| 黄色特级片| 中文一区二区 | 日韩精品视频在线播放 | 精品国产91 |