linux清理cached
sync
echo "1" >/proc/sys/vm/drop_caches
echo "0" >/proc/sys/vm/drop_caches
禁言
curl -d "checkCode=123456&type=0&videoId=22308" "http://www.url.com/v1/rest/sys/blockChat"
测试后台是否正常 每次会生成游客token
curl -d "net=3&client=2" "
限制发言人数为500,参数type为7,value为500 8(限制房间人数 使用curl &前要加\
curl http://websocket_ip:80/owl-websocket/rest/ws/sys/constantConfig?type=7\&value=10000
查看发言人数
curl http://123.57.162.123:80/owl-websocket/rest/ws/sys/getConfig?type=7
在redis中查询token命令
hgetall u:10011
查看media id
select id,user_id,title,begin_time from t_media_asset where title like "%直播名称%";
清理t_message
create table tmp as select max(id) as col1 from t_message_box group by receiver_id;
delete from t_message_box where id not in (select col1 from tmp);
drop table tmp;
查看表中的记录数
select count(*) from t_user;
模糊查找
select id,telephone,score,nick_name from t_user where nick_name like '%饭饭%';
更新分数
update t_user set score=1000 where id=10;
按分数排序
select score,nick_name from t_user order by score desc limit 10;
查询最后10行数据
select id,score from t_user order by id desc limit 10;
RDS无法导入数据库
sed '/GTID_PURGED/N;s/,\n/,/' owl-20150805.sql | grep -iv 'set @@global' > owl1.sql
sed -e 's/DEFINER[ ]*=[ ]*[^*]*\*/\*/' owl1.sql > owl2.sql
DELIMITER ;;
create trigger shareTrig
before update on t_share
for each row
begin
if old.media_id is not null and old.media_id > 0
then
update `Error: invalid_id_test` SET x=1;
end if;
end ;;
DELIMITER ;
修改所有用户密码为111111
update t_user set salt='a9667ac06b8f0148',password='1584d46f5ab3ffbbc9740911bd0d814bda9cc138'
转载于:https://my.oschina.net/direnjie/blog/542214