【MySQL8.0.32安装】Windows Server2019安装MySQL8.0.32
- 安装包下载:
https://downloads.mysql.com/archives/community/
下载mysql-8.0.32-winx64.zip
- 1、制定目录配置
basedir=D:\\mysql8.0.32
#mysql数据存放目录
datadir=D:\\mysql8.0.32\\data
将.zip压缩包解压到D盘,并重命名为mysql8.0.32
- 2、编辑my.ini文件
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | [client] #max_allowed_packet=32M # pipe # socket=0.0 port=3306 [mysql] no-beep #max_allowed_packet=32M default-character- set =utf8 [mysqld] max_allowed_packet=256M interactive_timeout=31536000 wait_timeout=300 group_concat_max_len=102400 early-plugin-load=keyring_file.dll keyring_file_data=D: /mysql-8 .0.32 /data #关闭SSL skip-ssl plugin-load=validate_password.dll validate_password_policy=1 validate-password=FORCE_PLUS_PERMANENT validate_password_number_count=1 validate_password_special_char_count=1 plugin-load-add=connection_control.dll connection-control=FORCE_PLUS_PERMANENT connection-control-failed-login-attempts=FORCE_PLUS_PERMANENT connection_control_failed_connections_threshold=10 port=3306 character- set -server=utf8mb4 default-storage-engine=INNODB sql-mode= "STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" basedir= "D:/mysql-8.0.32/" # Path to the database root datadir= "D:/mysql-8.0.32/data/" innodb_data_home_dir= "D:/mysql-8.0.32/data/" innodb_data_file_path=ibdata1:10M:autoextend innodb_log_group_home_dir= "D:/mysql-8.0.32/data/" innodb_file_per_table=1 log-error= "D:/mysql-8.0.32/logs/mysql.err" pid- file = "D:/mysql-8.0.32/tmp/mysql.pid" #socket="D:/mysql-8.0.32/tmp/mysql.socket" # General and Slow logging. #log-output=FILE #general-log=1 #general_log_file="mysqlgenaral.log" #slow-query-log=1 #slow_query_log_file="mysqlslow.log" #long_query_time=3 # Server Id. server- id =33061 # Binary Logging. log-bin= "D:/mysql-8.0.32/logs/mysql-bin" binlog_format=row expire_logs_days=7 log_bin_trust_function_creators=on max_connections=2000 max_connect_errors=1000 query_cache_size=0 query_cache_type=0 table_open_cache=2048 tmp_table_size=203M thread_cache_size=32 myisam_max_sort_file_size=100G myisam_sort_buffer_size=395M key_buffer_size=64M read_buffer_size=8M read_rnd_buffer_size=8M innodb_flush_log_at_trx_commit=1 innodb_log_buffer_size=16M innodb_buffer_pool_size=10G innodb_log_file_size=512M innodb_thread_concurrency=16 innodb_autoextend_increment=64 innodb_buffer_pool_instances=8 innodb_concurrency_tickets=5000 innodb_old_blocks_time=1000 innodb_open_files=300 innodb_stats_on_metadata=0 innodb_checksum_algorithm=0 back_log=80 flush_time=0 join_buffer_size=16M open_files_limit=4161 sort_buffer_size=16M table_definition_cache=1400 binlog_row_event_max_size=8K |
- 3、这里采用管理员用户administrator进行安装
1 | D: /mysql-8 .0.32 /bin/mysqld --initialize |
1 | D: /mysql-8 .0.32 /bin/net start mysql |
1 | <br>初始化输入这个命令可以查看初始密码 mysqld --initialize --console<br><em id = "__mceDel" >net start mysql 可能失败。< /em > |
修改密码
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';
分类:
MySQL管理
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
2021-11-04 【Oracle故障】DG新增数据文件,导致数据库宕机