91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

mysql錯誤ERROR 1044 (42000): Access denied for user

發布時間:2020-04-03 14:30:18 來源:網絡 閱讀:2445 作者:老肖的博客 欄目:系統運維

mysql錯誤ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'MAC'解決辦法

MariaDB?[(none)]>?create?database?MAC;
ERROR?1044?(42000):?Access?denied?for?user?''@'localhost'?to?database?'MAC'
MariaDB?[(none)]>?




方法一:
1.關閉mysql
???#?service?mysqld?stop?【?備注centos7是systemctl?stop?mariadb】
2.屏蔽權限
???#?mysqld_safe?--skip-grant-table
???屏幕出現:?Starting?demo?from?.....
3.新開起一個終端輸入
???#mysql?-uroot?-pxxxxxx
???MariaDB?[(none)]>?use?mysql;
???MariaDB?[mysql]>?
???MariaDB?[mysql]>?UPDATE?user?SET?Password=PASSWORD('newpassword')?where?USER='root';?????【備注:下一次會用newpassword密碼登錄數據庫】
???MariaDB?[mysql]>??FLUSH?PRIVILEGES;//記得要這句話,否則如果關閉先前的終端,又會出現原來的錯誤
???MariaDB?[mysql]>??\q



----------------------------------------------------------------------------
我的實操測試
[root@nessus?~]#?systemctl?stop?mysqld
Failed?to?stop?mysqld.service:?Unit?mysqld.service?not?loaded.
[root@nessus?~]#?systemctl?stop?mariadb
[root@nessus?~]#?
[root@nessus?~]#?
[root@nessus?~]#?mysqld_safe?--skip-grant-table
191030?11:11:24?mysqld_safe?Logging?to?'/var/log/mariadb/mariadb.log'.
191030?11:11:24?mysqld_safe?Starting?mysqld?daemon?with?databases?from?/var/lib/mysql


新開起一個終端輸入
[root@nessus?~]#?mysql?-uroot??【我的無密碼】
MariaDB?[(none)]>?use?mysql;
Reading?table?information?for?completion?of?table?and?column?names
You?can?turn?off?this?feature?to?get?a?quicker?startup?with?-A

Database?changed
MariaDB?[mysql]>?UPDATE?user?SET?Password=PASSWORD('newpassword')?where?USER='root';
Query?OK,?4?rows?affected?(0.01?sec)
Rows?matched:?4??Changed:?4??Warnings:?0

MariaDB?[mysql]>?
MariaDB?[mysql]>?
MariaDB?[mysql]>?FLUSH?PRIVILEGES;
Query?OK,?0?rows?affected?(0.00?sec)

MariaDB?[mysql]>?\q
Bye
[root@nessus?~]#?mysql?-uroot??【發現之前無密碼無法登陸了】
ERROR?1045?(28000):?Access?denied?for?user?'root'@'localhost'?(using?password:?NO)
[root@nessus?~]#?


[root@nessus?~]#?mysql?-uroot?-pnewpassword???【得用newpassword密碼登錄數據庫】
Welcome?to?the?MariaDB?monitor.??Commands?end?with?;?or?\g.
Your?MariaDB?connection?id?is?5
Server?version:?5.5.60-MariaDB?MariaDB?Server

Copyright?(c)?2000,?2018,?Oracle,?MariaDB?Corporation?Ab?and?others.

Type?'help;'?or?'\h'?for?help.?Type?'\c'?to?clear?the?current?input?statement.

MariaDB?[(none)]>?
MariaDB?[(none)]>?
MariaDB?[(none)]>?
MariaDB?[(none)]>?create?database?MAC;
Query?OK,?1?row?affected?(0.00?sec)

MariaDB?[(none)]>?
MariaDB?[(none)]>?
MariaDB?[(none)]>?
MariaDB?[(none)]>
向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

左贡县| 鄂托克旗| 安阳县| 石阡县| 吉林省| 宁强县| 凤山市| 巴里| 沾化县| 龙口市| 济宁市| 凤山县| 新化县| 南开区| 会同县| 玛沁县| 长汀县| 达孜县| 伊金霍洛旗| 宁陵县| 安康市| 南宁市| 息烽县| 长寿区| 个旧市| 英山县| 广南县| 鹤壁市| 招远市| 岳普湖县| 阿勒泰市| 康马县| 红原县| 福建省| 越西县| 扎鲁特旗| 区。| 金门县| 姚安县| 本溪| 北宁市|