1
0
Code Issues Pull Requests Projects Releases Wiki Activity GitHub Gitee

一些更新

This commit is contained in:
程序员小墨 2023-12-24 03:18:01 +08:00
parent 928dad71b9
commit 78642222cc
3 changed files with 120 additions and 4 deletions

View File

@ -0,0 +1,49 @@
# 家笔记本Win11中配置
[mysql]
default-character-set=utf8mb4
[mysqld]
port=3306
default_authentication_plugin=mysql_native_password
basedir=D:/Program/Development/Environment/phpstudy_pro/Extensions/MySQL8.0.12/
datadir=D:/Program/Development/Environment/phpstudy_pro/Extensions/MySQL8.0.12/data/
character-set-server=utf8mb4
default-storage-engine=InnoDB
max_connections=1000
collation-server=utf8mb4_unicode_ci
init_connect='SET NAMES utf8mb4'
innodb_buffer_pool_size=64M
# 64M 1G 4G 5G
innodb_flush_log_at_trx_commit=1
innodb_lock_wait_timeout=120
innodb_log_buffer_size=4M
innodb_log_file_size=256M
interactive_timeout=120
join_buffer_size=2M
key_buffer_size=32M
log_error_verbosity=1
max_allowed_packet=16M
max_heap_table_size=64M
myisam_max_sort_file_size=64G
myisam_sort_buffer_size=32M
read_buffer_size=512kb
read_rnd_buffer_size=4M
skip-external-locking=on
sort_buffer_size=256kb
table_open_cache=256
thread_cache_size=16
tmp_table_size=64M
wait_timeout=120
skip-log-bin
server_id=100
gtid_mode=off_permissive
enforce_gtid_consistency=on
replicate_do_db=neteasemusic
replicate_ignore_db=mysql
slave_skip_errors=all
[client]
port=3306
default-character-set=utf8mb4

View File

@ -0,0 +1,65 @@
# 当前配置文件
# 针对网易云音乐爬虫 + 家台式机做了特别调整
[mysql]
default-character-set=utf8mb4
[mysqld]
port=3306
default_authentication_plugin=mysql_native_password
# basedir=D:/Program/Development/Environment/phpstudy_pro/Extensions/MySQL8.0.12/
# datadir=D:/Program/Development/Environment/phpstudy_pro/Extensions/MySQL8.0.12/data/
basedir=D:/Program/Develop/Environment/phpstudy_pro/Extensions/MySQL8.0.12/
datadir=D:/Program/Develop/Environment/phpstudy_pro/Extensions/MySQL8.0.12/data/
character-set-server=utf8mb4
default-storage-engine=InnoDB
max_connections=1000
collation-server=utf8mb4_unicode_ci
init_connect='SET NAMES utf8mb4'
# 这个参数决定了InnoDB存储引擎的缓冲池大小缓冲池用于缓存数据和索引提高查询和写入的性能。一般建议将这个参数设置为物理内存的50%~80%
# 默认 64M
# 64M 1G 4G 5G
innodb_buffer_pool_size=32G
# 这个参数决定了事务提交时日志刷新到磁盘的频率。如果设置为1默认值则每次事务提交时都会刷新日志这样可以保证数据的一致性和恢复能力但会降低写入性能。如果设置为0或2则每秒刷新一次日志这样可以提高写入性能但会增加数据丢失的风险。可以根据您的业务需求和容忍度选择合适的值
# 默认 1
innodb_flush_log_at_trx_commit=0
innodb_lock_wait_timeout=120
innodb_log_buffer_size=4M
# 这个参数决定了重做日志文件的大小重做日志文件用于记录数据的变化以便在崩溃恢复时重放。这个参数的大小影响着数据库的性能和恢复时间。一般建议将这个参数设置为1~2倍的缓冲池大小但不要超过4G。您的配置文件中将这个参数设置为256M这可能太小了您可以根据您的缓冲池大小适当增大这个值
# 默认 256M
innodb_log_file_size=1G
interactive_timeout=120
join_buffer_size=2M
key_buffer_size=32M
log_error_verbosity=1
max_allowed_packet=16M
max_heap_table_size=64M
myisam_max_sort_file_size=64G
myisam_sort_buffer_size=32M
read_buffer_size=512kb
read_rnd_buffer_size=4M
skip-external-locking=on
sort_buffer_size=256kb
table_open_cache=256
thread_cache_size=16
tmp_table_size=64M
wait_timeout=120
# 这个参数表示关闭二进制日志功能二进制日志用于记录数据的变化以便进行复制或点恢复。如果您不需要这些功能您可以关闭二进制日志这样可以节省磁盘空间和I/O开销提高写入性能。但是如果您需要进行复制或点恢复您必须开启二进制日志并且选择合适的格式和过期时间
skip-log-bin
# replicate_do_db, replicate_ignore_db参数指定复制的数据库。但是如果您关闭了二进制日志功能这些参数就没有意义了因为复制依赖于二进制日志。您可以删除这些参数或者根据您的复制需求重新开启二进制日志
# gtid_mode, enforce_gtid_consistency参数用于开启全局事务标识GTID模式GTID模式可以简化复制的管理和故障恢复。但是如果您关闭了二进制日志功能这些参数也没有意义了因为GTID模式依赖于二进制日志。您可以删除这些参数或者根据您的复制需求重新开启二进制日志
server_id=100
# gtid_mode=off_permissive
# enforce_gtid_consistency=on
# replicate_do_db=neteasemusic
# replicate_ignore_db=mysql
# slave_skip_errors=all
# Forcing InnoDB Recovery
# https://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html
# innodb_force_recovery = 6
[client]
port=3306
default-character-set=utf8mb4

View File

@ -11,12 +11,12 @@
Target Server Version : 80012
File Encoding : 65001
Date: 10/11/2022 14:27:21
Date: 24/12/2023 02:53:47
*/
/*
CREATE DATABASE `neteaseMusic` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_0900_ai_ci';
USE `neteaseMusic`;
CREATE DATABASE `neteasemusic` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_0900_ai_ci';
USE `neteasemusic`;
*/
SET NAMES utf8mb4;
@ -119,7 +119,8 @@ CREATE TABLE `comment_progress` (
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间',
`modify_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
PRIMARY KEY (`song_id`) USING BTREE,
INDEX `current_status`(`current_status`) USING BTREE
INDEX `current_status`(`current_status`) USING BTREE,
INDEX `song_id`(`song_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
@ -190,6 +191,7 @@ CREATE TABLE `playlist` (
`remix_video` json NULL COMMENT '保留字段JSON格式数组',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间',
`modify_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`related_playlist` json NULL COMMENT '是否获取了相关歌单',
PRIMARY KEY (`playlist_id`) USING BTREE,
INDEX `playlist_id`(`playlist_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;