零星小碎

1. Lnmp下pureftpd新建FTP账户权限不足解决方法


chattr -i /default/.user.ini

chown www:www -R /home/wwwroot/default/

之后可上传文件



2. lnmp  php_info拓展

lnmp安装目录进入src文件夹下,解压其中的你的PHP对应版本的压缩包 

tar -jxvf php-7.1.7.tar.bz2

cd/home/lnmp1.4/src/php-7.1.7/ext/fileinfo

/usr/local/php/bin/phpize

./configure-with-php-config=/usr/local/php/bin/php-config

make&&make install

vim /usr/local/php/etc/php.ini

增加extension ="fileinfo.so"

重启lnmp解决



3. Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.


127.0.0.1:6379>configsetstop-writes-on-bgsave-errorno



4.删除数据库中重复的数据


把需要保留的数据id存在临时表中,然后删除重复数据

create  table  tmp_table as select min(id) from demo_table group by email;

查看一下临时表

select*fromtmp_table;

删除重复的数据

delete from demo_table where id not in(select * from tmp_table);

删除临时表

drop table tmp_table;



5.DELETE FROM demo_videos WHERE id NOT IN ( SELECT minid FROM ( SELECT min(id) AS minid FROM demo_videos GROUP BY title ) b )

你可能感兴趣的:(零星小碎)