数据库
胖子呀
这个作者很懒,什么都没留下…
展开
-
mysql数据库修改用户权限
1、登陆:mysql -u root -p2、查看现有用户:select host ,user ,authentication_string from mysql.user;3、新建用户:create user 'username'@'host' identified by 'password'eg: create user "testuser"@'host' identified b...原创 2020-02-18 10:32:59 · 4411 阅读 · 1 评论 -
mysql 数据库 插入数据,如果数据库中已经存在该条记录就更新
tablename这个表有三个字段,a、b、c,a这个字段是主键。现在要往表里插入数据,如果主键a对应的这条数据已经在数据库中存在 ,就更新这条数据inset into tablename(a,b,c) values('a','b','c') on duplicate key update b = 'b',c = 'c';...原创 2019-06-28 10:19:16 · 4604 阅读 · 0 评论