进阶知识点
SET GLOBAL general_log = 'ON';
SHOW VARIABLES LIKE "general_log%";
SELECT * FROM mysql.general_log;
'general_log', 'ON'
'general_log_file', '/var/lib/mysql/d1cbef4ec7bf.log'
面试要点
上节课作业
# salary, dept_name
'55574.8794', 'Human Resources'
'57251.2719', 'Quality Management'
'58770.3665', 'Customer Service'
'59478.9012', 'Development'
'59605.4825', 'Production'
'59665.1817', 'Research'
'70489.3649', 'Finance'
'71913.2000', 'Marketing'
'80667.6058', 'Sales'
redis的作用
Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes with radius queries and streams
作用
- cache: 做mysql的缓存,从mysql读出来的数据,可以缓存到redis用于应用的访问。
- message broker:先把数据存到redis,到了一定阶段再保存到mysql
进阶知识点
SET GLOBAL general_log = 'ON';
SHOW VARIABLES LIKE "general_log%";
SELECT * FROM mysql.general_log;
'general_log', 'ON'
'general_log_file', '/var/lib/mysql/d1cbef4ec7bf.log'
面试要点
上节课作业
# salary, dept_name
'55574.8794', 'Human Resources'
'57251.2719', 'Quality Management'
'58770.3665', 'Customer Service'
'59478.9012', 'Development'
'59605.4825', 'Production'
'59665.1817', 'Research'
'70489.3649', 'Finance'
'71913.2000', 'Marketing'
'80667.6058', 'Sales'
参考资料
进阶知识点
SET GLOBAL general_log = 'ON';
SHOW VARIABLES LIKE "general_log%";
SELECT * FROM mysql.general_log;
'general_log', 'ON'
'general_log_file', '/var/lib/mysql/d1cbef4ec7bf.log'
面试要点
上节课作业
# salary, dept_name
'55574.8794', 'Human Resources'
'57251.2719', 'Quality Management'
'58770.3665', 'Customer Service'
'59478.9012', 'Development'
'59605.4825', 'Production'
'59665.1817', 'Research'
'70489.3649', 'Finance'
'71913.2000', 'Marketing'
'80667.6058', 'Sales'