第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

MySQL 8.0 用戶管理 更改密碼 創(chuàng)建用戶登錄 遇到很迷的問題

MySQL 8.0 用戶管理 更改密碼 創(chuàng)建用戶登錄 遇到很迷的問題

喵喵時光機 2019-05-10 15:59:34
1、MySQL版本8.0根據(jù)官方文檔來創(chuàng)建用戶,設(shè)置密碼。然后測試登錄以及更改密碼。1.1、創(chuàng)建用戶并登陸測試在MySQL服務(wù)器上創(chuàng)建用戶。mysql>createuser'aplan'@'%'identifiedby'Aplan123@';QueryOK,0rowsaffected(0.00sec)mysql>flushprivileges;QueryOK,0rowsaffected(0.00sec)mysql>grantallonaplan.*to'aplan'@'%';QueryOK,0rowsaffected(0.15sec)mysql>mysql>mysql>flushprivileges;QueryOK,0rowsaffected(0.00sec)然后使用用戶登錄MySQL測試[root@testzhiwei]#/usr/local/mysql/bin/mysql-uaplan-pAplan123@Warning:Usingapasswordonthecommandlineinterfacecanbeinsecure.ERROR1045(28000):Accessdeniedforuser'aplan'@'localhost'(usingpassword:YES)[root@testzhiwei]#[root@testzhiwei]#[root@testzhiwei]#[root@testzhiwei]#/usr/local/mysql/bin/mysql-uaplan-pEnterpassword:ERROR1045(28000):Accessdeniedforuser'aplan'@'localhost'(usingpassword:YES)無法登錄。1.2、更改用戶密碼mysql>ALTERUSER'aplan'@'%'IDENTIFIEDBY'password';ERROR1064(42000):YouhaveanerrorinyourSQLsyntax;checkthemanualthatcorrespondstoyourMySQLserverversionfortherightsyntaxtousenear'IDENTIFIEDBY'password''atline1?????我這哪里的語法錯了???
查看完整描述

2 回答

?
慕沐林林

TA貢獻2016條經(jīng)驗 獲得超9個贊

Thecaching_sha2_passwordandsha256_passwordauthenticationpluginsprovidemoresecurepasswordencryptionthanthemysql_native_passwordplugin,andcaching_sha2_passwordprovidesbetterperformancethansha256_password.Duetothesesuperiorsecurityandperformancecharacteristicsofcaching_sha2_password,itisasofMySQL8.0thepreferredauthenticationplugin,andisalsothedefaultauthenticationpluginratherthanmysql_native_password.
CREATEUSER'aplan'@'%'IDENTIFIEDWITHmysql_native_passwordBY'Aplan123@';
                            
查看完整回答
反對 回復(fù) 2019-05-10
?
慕仙森

TA貢獻1827條經(jīng)驗 獲得超8個贊

注意文本格式,有時候在其他地方直接復(fù)制粘貼執(zhí)行會有問題,例如從word復(fù)制執(zhí)行。另外密碼如果有特殊符號,可以用單引號括起來。以下是測試,沒發(fā)現(xiàn)有什么問題:mysql>createuser'aplan'@'%'identifiedby'Aplan123@';QueryOK,0rowsaffected(0.02sec)
mysql>selectuser,hostfrommysql.user;
user
host
aplan
%
mysql.infoschema
localhost
mysql.session
localhost
mysql.sys
localhost
root
localhost
5rowsinset(0.00sec)
mysql>flushprivileges;QueryOK,0rowsaffected(0.04sec)
mysql>exitBye[root@linux-basemysql]#mysql-uaplan-p'Aplan123@'mysql:[Warning]Usingapasswordonthecommandlineinterfacecanbeinsecure.WelcometotheMySQLmonitor.Commandsendwith;org.YourMySQLconnectionidis10Serverversion:8.0.12MySQLCommunityServer-GPL
Copyright(c)2000,2018,Oracleand/oritsaffiliates.Allrightsreserved.
OracleisaregisteredtrademarkofOracleCorporationand/oritsaffiliates.Othernamesmaybetrademarksoftheirrespectiveowners.
Type'help;'or'h'forhelp.Type'c'toclearthecurrentinputstatement.
mysql>selectuser();
user()
aplan@localhost
1rowinset(0.00sec)mysql>alteruseraplan@'%'identifiedby'password';QueryOK,0rowsaffected(0.04sec)
mysql>exitBye[root@linux-basemysql]#mysql-uaplan-p'password'mysql:[Warning]Usingapasswordonthecommandlineinterfacecanbeinsecure.WelcometotheMySQLmonitor.Commandsendwith;org.YourMySQLconnectionidis11Serverversion:8.0.12MySQLCommunityServer-GPL
Copyright(c)2000,2018,Oracleand/oritsaffiliates.Allrightsreserved.
OracleisaregisteredtrademarkofOracleCorporationand/oritsaffiliates.Othernamesmaybetrademarksoftheirrespectiveowners.
Type'help;'or'h'forhelp.Type'c'toclearthecurrentinputstatement.
mysql>selectuser();
user()
aplan@localhost
1rowinset(0.00sec)
                            
查看完整回答
反對 回復(fù) 2019-05-10
  • 2 回答
  • 0 關(guān)注
  • 1300 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號