📜  mysql 添加 root 密码 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:02.891000             🧑  作者: Mango

代码示例2
cd "C:\Program Files\MySQL\MySQL Server 8.0\bin"

C:\Program Files\MySQL\MySQL Server 8.0\bin> mysql -u root -p
Enter password: *********

mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'newrootpassword';
Query OK, 0 rows affected (0.10 sec)

mysql> exit