国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數據庫 > MySQL > 正文

mysql Access denied for user ‘root’@’localhost’ (using passw

2024-07-24 12:45:48
字體:
來源:轉載
供稿:網友

今天在啟動mysql時出現以下問題:

[root@www ~]# mysql -u root -pEnter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

網上的答案是各種各樣的,最終解決問題的方法總結為以下,好多都是沒有設置初始密碼造成此問題的。

解決方法如下:

[root@www ~]# service mysqld stop #先關閉mysql服務Stopping mysqld: [ OK ][root@www ~]# mysqlERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)[root@www ~]# mysql -u root -p #關閉服務后又出現如下問題Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)[root@www ~]# mysql -u root mysql #鍵入此命令進入mysqlReading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -AWelcome to the MySQL monitor. Commands end with ; or /g.Your MySQL connection id is 1Server version: 5.1.73 Source distributionCopyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '/h' for help. Type '/c' to clear the current input statement.mysql> update user set password=password('123') where user='root' and host='localhost'; ---->修改root的密碼Query OK, 1 row affected (0.04 sec)Rows matched: 1 Changed: 1 Warnings: 0mysql> flush priviledge;ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'priviledge' at line 1mysql> flush privileges;Query OK, 0 rows affected (0.00 sec)mysql> /qBye[root@www ~]# mysql -u root -p ------>重新進入Enter password: Welcome to the MySQL monitor. Commands end with ; or /g.Your MySQL connection id is 2Server version: 5.1.73 Source distributionCopyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '/h' for help. Type '/c' to clear the current input statement.mysql> /qBye

到此就完了!!

您可能感興趣的文章:

MYSQL ERROR 1045 (28000): Access denied for user (using password: YES)問題的解決mysql ERROR 1044 (42000): Access denied for user ''''@''localhost'' to databaselinux mysql忘記密碼的多種解決或Access denied for user ''root''@''localhost''解決mysql創建數據庫后出現:Access denied for user ''root''@''%'' to database ''xxx''的問題解決ubuntu 16.04安裝mysql5.7.17后,登錄時出現ERROR 1045 (28000): Access denied for user ''root''@''localhost''問題MySQL ERROR 1045 (28000): Access denied for user ''root''@''localhost'' (using password: NO) 的原因分解決辦法ubuntu系統中Mysql ERROR 1045 (28000): Access denied for user root@ localhost問題的解決方法新裝MySql后登錄出現root帳號提示mysql ERROR 1045 (28000): Access denied for use的解決辦法Linux連接mysql報錯:Access denied for user ‘root’@‘localhost’(using password: YES)的解決方法
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 鹤岗市| 潢川县| 湟中县| 将乐县| 高唐县| 新化县| 麻栗坡县| 蓬安县| 藁城市| 南郑县| 瓮安县| 城步| 大悟县| 习水县| 马公市| 化德县| 房产| 响水县| 临夏县| 沂源县| 红桥区| 鞍山市| 平凉市| 台中县| 衡水市| 吉安市| 北碚区| 陆川县| 郧西县| 开原市| 金川县| 宾阳县| 宿松县| 佛学| 大渡口区| 岳普湖县| 成武县| 富宁县| 页游| 盐亭县| 老河口市|