一鸣个、window 安裝 MySQL8.0.24
Windows安裝和完全卸載MySQL8.0(超詳細教程)
https://baijiahao.baidu.com/s?id=1670299179953483847&
但是
1步清、my.ini文件必須在安裝之前創(chuàng)建好(安裝根目錄 D:/MySQL)。如果不創(chuàng)建my.ini配置文件桌粉,MySQL依然可以安裝成功。但安裝好后再創(chuàng)建my.ini配置則不生效(暫未找到生效辦法)。所以在安裝之前創(chuàng)建my.ini配置文件是最好的嗅回。
2辣苏、data目錄無需創(chuàng)建肝箱,在安裝過程中data目錄會自動被創(chuàng)建
3、my.ini配置文件如下
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.
[client]
default-character-set = utf8mb4
[mysql]
default-character-set = utf8mb4
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
init_connect='SET collation_connection = utf8mb4_unicode_ci'
init_connect='SET NAMES utf8mb4'
# 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
datadir = D:\MySQL\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.
# show variables like '%char%';
# show variables like '%sort_buffer_size%'; sort_buffer_size | 33554432 |=32x1024x1024
# show variables like '%read_rnd_buffer_size%'; read_rnd_buffer_size | 33554432 |=32x1024x1024
# show variables like '%innodb_buffer_pool_size%'; innodb_buffer_pool_size | 134217728 |=128x1024x1024
# show variables like '%join_buffer_size%'; join_buffer_size | 134217728 |=128x1024x1024
join_buffer_size = 128M
sort_buffer_size = 32M
read_rnd_buffer_size = 32M
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
二稀蟋、修改xampp的mariadb密碼
Windows安裝和完全卸載MySQL8.0(超詳細教程)
https://baijiahao.baidu.com/s?id=1670299179953483847&
1煌张、打開xampp面板,點擊shell退客,
2骏融、# mysql -u root -p
3、# 初始密碼為空萌狂,直接按Enter鍵
4绎谦、# alter user 'root'@'localhost' identified by '123456'; # 更改root的密碼為123456
5、# FLUSH PRIVILEGES; # 刷新權(quán)限
6粥脚、打開 D:\xampp\phpMyAdmin 文件 config.inc.php窃肠,將
$cfg['Servers'][$i]['password'] = '123456';