上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 36 下一页
摘要: truncate table 表名 阅读全文
posted @ 2022-09-19 22:05 lucky_tomato 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 在mysql中插入数据的时候常常因为主键存在而冲突报错,下面有两个解决方法: 1、在insert 语句中添加ignore 关键字,如:insert ignore into table (id,name) values ('1','username');这是如果id主键已经存在的时候,就会忽略现在数据 阅读全文
posted @ 2022-09-19 22:04 lucky_tomato 阅读(1007) 评论(0) 推荐(0) 编辑
摘要: 使用场景1. 自己写的程序,没有启动脚本2. 程序运行后,得用nohup进行后台运行以及日志输出3. 一台服务器里面有多个程序,而且有优先级 上述场景下对应的好处:1. 帮助你拥有启动和关闭的操作接口2. 日志除了stdout显示之外,还可以输出到指定文件3. 几个程序运行在一个节点里面,可以进行优 阅读全文
posted @ 2022-09-19 22:02 lucky_tomato 阅读(245) 评论(0) 推荐(0) 编辑
摘要: # php5.5版本 <?php $conn = mysql_connect('ip地址','用户名','密码'); if($conn) { mysql_select_db("codo_cmdb",$conn); $sql="select * from asset_server"; $result= 阅读全文
posted @ 2022-09-19 21:53 lucky_tomato 阅读(50) 评论(0) 推荐(0) 编辑
摘要: import pwd usernames = [x[0] for x in pwd.getpwall()] if 'nginx' in usernames: print("nginx") 阅读全文
posted @ 2022-09-19 21:50 lucky_tomato 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 1.count(1)和count(*)的作用: 都是检索表中所有记录行的数目,不论其是否包含null值。 2.区别:但是count(1)比count(*)效率更高 3.count(字段)与count(1)和count(*)的区别 count(字段)的作用是检索表中的这个字段的非空行数,不统计这个字段 阅读全文
posted @ 2022-09-19 21:47 lucky_tomato 阅读(812) 评论(0) 推荐(0) 编辑
摘要: 问题: /usr/bin/ld: ext/ldap/.libs/ldap.o: undefined reference to symbol 'ber_scanf' /usr/bin/ld: note: 'ber_scanf' is defined in DSO /lib64/liblber-2.4. 阅读全文
posted @ 2022-09-19 21:45 lucky_tomato 阅读(411) 评论(0) 推荐(0) 编辑
摘要: 解决: cd ext/phar/ cp ./phar.php ./phar.phar make install 阅读全文
posted @ 2022-09-19 21:44 lucky_tomato 阅读(160) 评论(0) 推荐(1) 编辑
摘要: yum install libldap* cp -frp /usr/lib64/libldap* /usr/lib/ 阅读全文
posted @ 2022-09-19 21:43 lucky_tomato 阅读(60) 评论(0) 推荐(0) 编辑
摘要: 在Python脚本里面加 #!/usr/bin/python 阅读全文
posted @ 2022-09-19 21:41 lucky_tomato 阅读(474) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 36 下一页