window 安装 MySQL8.0.24 修改xampp的mariadb密码

一、window 安装 MySQL8.0.24
Windows安装和完全卸载MySQL8.0(超详细教程)
https://baijiahao.baidu.com/s?id=1670299179953483847&

但是
1、my.ini文件必须在安装之前创建好(安装根目录 D:/MySQL)。如果不创建my.ini配置文件,MySQL依然可以安装成功。但安装好后再创建my.ini配置则不生效(暂未找到生效办法)。所以在安装之前创建my.ini配置文件是最好的。
2、data目录无需创建,在安装过程中data目录会自动被创建
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; # 刷新权限
6、打开 D:\xampp\phpMyAdmin 文件 config.inc.php,将

$cfg['Servers'][$i]['password'] = '123456';

7、http://localhost/phpmyadmin/

你可能感兴趣的:(window 安装 MySQL8.0.24 修改xampp的mariadb密码)