赞
踩
官网下载地址:https://dev.mysql.com/downloads/mysql/
[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:\\mysql-8.0.24-winx64 datadir = D:\\mysql-8.0.24-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 character-set-server = utf8mb4 performance_schema_max_table_instances = 600 table_definition_cache = 400 table_open_cache = 256 sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION lower_case_table_names = 1 skip-log-bin [mysql] default-character-set = utf8mb4 [client] default-character-set = utf8mb4
注:若安装路径不在本示例路径下,需要改basedir、datadir两个参数
cd D:\mysql-8.0.24-winx64\bin mysqld –install
cd D:\mysql-8.0.24-winx64\bin mysqld --initialize --console
注:执行完该命令后会出现数据库root用户的初始密码,一定要复制保存,后面登录需要用到
cd D:\mysql-8.0.24-winx64\bin net start mysql
ALTER USER 'root'@'localhost' IDENTIFIED BY 'root' PASSWORD EXPIRE NEVER;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
附:MySQL8.0.24压缩包
链接:https://pan.baidu.com/s/1tCqiqghCzoy3YJ2lkl6dAg
提取码:tbv5
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。