mongo shell 操作 aggregate 使用mongo db 的 aggregate 进行聚合操作,改操作传入的参数是一个数组 aggregate 操作的参数 match 相当于 mysql 的 where,传入的是筛选条件 示例: {$match : { 'os': 'win' } } ...
分类:
数据库 时间:
2021-04-13 12:04:07
阅读次数:
0
监控MySQL Server运行时资源消耗、资源等待,information_schema关注Server运行的元数据信息,performance_schema通过事件来实现监控,事件可以是函数调用、操作系统等待、或者sql语句的解析排序等阶段 其他特点: performance_schema不会随 ...
分类:
其他好文 时间:
2021-04-13 11:59:30
阅读次数:
0
一张自增表里面总共有 7 条数据,删除了最后 2 条数据,重启 mysql 数据库,又插入了一条数据,此时 id 是几? 表类型如果是 MyISAM ,那 id 就是 8。表类型如果是 InnoDB,那 id 就是 6。 InnoDB 表只会把自增主键的最大 id 记录在内存中,所以重启之后会导致最 ...
分类:
数据库 时间:
2021-04-13 11:57:17
阅读次数:
0
数据库安装,待完善 https://www.cnblogs.com/wendy-0901/p/12673705.html https://blog.csdn.net/yougoule/article/details/56680952 数据库启动 service mysql start; 数据库关闭 ...
分类:
数据库 时间:
2021-04-13 11:43:45
阅读次数:
0
MySQL:系统提供了很多函数 Count:统计个数,次数,null不统计 Max:最大值 Min:最小值 Sum:求和 Avg:平均值 Round:四舍五入 ...
分类:
其他好文 时间:
2021-04-12 12:55:32
阅读次数:
0
1 def find_worldByName(c_name,continent): 2 print(c_name) 3 print(continent) 4 sql = " SELECT * FROM world WHERE 1=1 " 5 if(c_name!=None): 6 sql=sql+" ...
分类:
数据库 时间:
2021-04-12 12:45:06
阅读次数:
0
1. vi /etc/my.cnf 2. update mysql.user set authentication_string=password('123456') where user='root' and host='localhost'; 3. FLUSH PRIVILEGES; ...
分类:
数据库 时间:
2021-04-12 12:44:01
阅读次数:
0
例如MySQL的端口3306 firewall-cmd --zone=public --add-port=3306/tcp --permanent 重启防火墙并查看是否生效 firewall-cmd --reload #重启firewall firewall-cmd --list-ports #查看 ...
分类:
其他好文 时间:
2021-04-12 12:43:20
阅读次数:
0
-- DENSE_RANK:并列连续排序,并列即相同的值,相同的值保留重复名次,遇到下一个不同值时,依然按照连续数字排名 SELECT emp_no, salary, DENSE_RANK() OVER(ORDER BY salary DESC) as t_rank from salaries; - ...
分类:
数据库 时间:
2021-04-12 12:32:54
阅读次数:
0
使用mysql-8.0.23版的,创建用户屡屡失败,最终靠万能的度娘解决: 已知版本信息: C:\Users\Administrator\Desktop\mysql-8.0.23-winx64\mysql-8.0.23-winx64\bin>mysql -Vmysql Ver 8.0.23 for ...
分类:
数据库 时间:
2021-04-12 12:20:25
阅读次数:
0