Mysql常用命令
mysql update select 查询方法
update work_result_2003 as a inner join (select * from work_result_2003 where work_id =1) as b on a.work_id=2 set a.result=b.result;
创建数据库并指定字符集命令
CREATE DATABASE IF NOT EXISTS dbname DEFAULT CHARSET utf8mb4 COLLATE utf8mb4_general_ci;
查看用户权限
show grants for 'test_user'@'%';
用户授权并设置密码
grant all privileges on . to 'test_user'@'%' identified by 'abcd1234';