Mysql笔记

来源:互联网 发布:做淘宝云客服工资多少 编辑:程序博客网 时间:2024/05/23 13:46

1、修改数据库密码

>mysql -u root -p 
Enter password: ****** 
mysql> use mysql; 
mysql> update user set password=password('new_password') where user='root'; 

回显 
Query OK, 0 rows affected (0.00 sec) 
Rows matched: 2 Changed: 0 Warnings: 0 
mysql> 状态下输入 FLUSH PRIVILEGES; 
回显 
Query OK, 0 rows affected (0.00 sec) 
mysql> 状态下输入 quit 
退出 sql 

注意:要切换到mysql数据库 就是use mysql命令



0 0