您的位置:首页 > 数据库 > MySQL

mysql(DML操作)对数据进行增删改操作-命令行 修改数据库密码等

2019-06-30 21:13 681 查看

1、查询表中的所有数据

select * from 表名;

2、插入操作

insert into 表名(列名1,列名2) values(值1,值2);

3、更新操作

update 表名 set name='zs';

4、删除操作

delete from 表名 where name='zs';

5、修改数据库密码

use mysql;
update user set password=password('abc') WHERE User='root';
update mysql.user set authentication_string=password('123456') where user='root' and Host = 'localhost';
flush privileges;刷新MySQL的系统权限相关表
mysqladmin -u root -p password 12356
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐