SELECT id FROM (SELECT uid, score, (@rowno:=@rowno+1) as rowno from user, (SELECT (@rowno:=0)) b ORDER BY score DESC) c WHERE rowno=1;
SELECT id FROM (SELECT uid, score, (@rowno:=@rowno+1) as rowno from user, (SELECT (@rowno:=0)) b ORDER BY score DESC) c WHERE rowno=1;
在超长字段上创建索引时, 会报错:
ERROR 1709 (HY000): Index column size too large. The maximum column size is 767 bytes.
在my.ini中设置 innodb_large_prefix = 1
执行下面命令, 变更数据格式
alter table <表名> row_format=dynamic;
alter table <表名> row_format=compressed;
如果报错:
South migrate error, InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope
在my.ini中设置 innodb_file_format = Barracuda
再执行上述SQL
参考: https://stackoverflow.com/questions/23556926/south-migrate-error-innodb-row-format-dynamic-requires-innodb-file-format-an
https://help.aliyun.com/knowledge_detail/155946.html
// 1. 取出对象的第一个key来获取
obj[Object.keys(obj)[0]]
// 2. 取出对象的值数组的第一个
Object.values(obj)[0]
wget https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2017.3.23.tgz #下载
tar -xvf ntfs-3g_ntfsprogs-2017.3.23.tgz #解压
su #提权
./configure && make && make install #进入ntfs-3g_ntfsprogs-2017.3.23 目录并安装
在网站中选择要设置SSL的域名, 到SSL选项卡->Let's Encrypt
选择文件验证
, 勾选域名, 点击申请
提示此错误, 是因为Let's Encrypt在2019.11终止了V1证书注册
https://community.letsencrypt.org/t/end-of-life-plan-for-acmev1/88430
cat /root/.acme.sh/acme.sh | grep VER=
显示VER=2.7.*
则是V1版本
显示VER=2.8.*
则是V2版本
/root/.acme.sh/acme.sh --upgrade