om/数据库/mysql/常用.md

22 lines
710 B
Markdown

```sql
-- 查找参数
SHOW GLOBAL VARIABLES;
SHOW GLOBAL VARIABLES like 'offline_mode';
-- 创建用户 允许任何ip连接
CREATE USER 'closeToU8'@'%' IDENTIFIED BY 'frpPurchase8*';
-- 授予权限
GRANT SELECT, update ON frp_xiongbang.f_api_address TO 'closeToU8'@'%';
FLUSH PRIVILEGES;
select * from f_api_address where remarks like '%采购%'
select * from f_api_address where id in ('11016','11006') and remarks like '%采购%'
update f_api_address set delete_flag = 1 where id in ('11016','11006');
select * from f_api_address where id in ('11016','11006');
update f_api_address set delete_flag = 0 where id in ('11016','11006');
select * from f_api_address where id in ('11016','11006');
```