我有 Linux 和 Apache2,但對于 MySql,我按照教程安裝 LAMP。我跟著它,在我們必須跑的地方之后,我得到了.但根據(jù)教程,我應(yīng)該得到:sudo mysqlERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)Welcome to the MySQL monitor.? Commands end with ; or \g.Your MySQL connection id is 22Server version: 8.0.19-0ubuntu5 (Ubuntu)Copyright (c) 2000, 2020, 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>?請任何人盡快幫助我,因為我正在做的課程有截止日期。此外,如果網(wǎng)絡(luò)上有任何文檔,請分享。如果您需要有關(guān)錯誤的更多信息,請告訴我以及如何提取它們。謝謝。
1 回答

慕少森
TA貢獻(xiàn)2019條經(jīng)驗 獲得超9個贊
在mysql控制臺中嘗試以下命令
mysql> FLUSH PRIVILEGES; mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password';
- 1 回答
- 0 關(guān)注
- 164 瀏覽
添加回答
舉報
0/150
提交
取消