mysql安装教程8.0.34

发布时间: 2023-11-21 10:24 阅读: 文章来源:1MUMB10PS

下载zip版本

建立data目录

生成my.ini文件

[mysqld]# Remove leading # and set to the amount of RAM for the most important data# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.# innodb_buffer_pool_size = 128M # Remove leading # to turn on a very important data integrity option: logging# changes to the binary log between backups.# log_bin # These are commonly set, remove the # and set as required.basedir ="D:\\alantop_dir\\alantop_sde\\mysql-8.0.34-winx64"datadir ="D:\\alantop_dir\\alantop_sde\\mysql-8.0.34-winx64\\Data"port = 3306# server_id = ..... # Remove leading # to set options mainly useful for reporting servers.# The server defaults are faster for transactions and fast SELECTs.# Adjust sizes as needed, experiment to find the optimal values.# join_buffer_size = 128M# sort_buffer_size = 2M# read_rnd_buffer_size = 2M #sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES #sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES character-set-server = utf8mb4# 创建新表时将使用的默认存储引擎default-storage-engine=INNODB performance_schema_max_table_instances = 600table_definition_cache = 400table_open_cache = 256innodb_strict_mode=0sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION [mysql]default-character-set = utf8mb4 [client]port=3306default-character-set = utf8mb4

初始化mysql

mysqld --initialize --console

键入命令后,控制台会有mysql的初始化密码

启动mysql服务

mysqld --console

•••展开全文