当前位置:Gxlcms > 数据库问题 > Installing MySQL on Microsoft Windows Using a noinstall ZIP Archive

Installing MySQL on Microsoft Windows Using a noinstall ZIP Archive

时间:2021-07-01 10:21:17 帮助过:11人阅读

目录
  • Extracting the Install Archive
  • Creating an Option File
  • Customizing the PATH for MySQL Tools
  • Initializing the Data Directory
  • Starting the Server for the First Time
  • Post-Initialization root Password Assignment

Extracting the Install Archive

D:\mysql\mysql-5.7.32-winx64

Creating an Option File

D:\mysql\mysql-5.7.32-winx64\my.ini

[client]
default-character-set=utf8

[mysqld]
# set basedir to your installation path
basedir=D:/mysql
# set datadir to the location of your data directory
datadir=D:/mysql/mysql-5.7.32-winx64/data

port=3306

character-set-server=utf8mb4

default-storage-engine=INNODB

Customizing the PATH for MySQL Tools

MYSQL_HOME
D:\mysql\mysql-5.7.32-winx64

%MYSQL_HOME%\bin;

To make it easier to invoke MySQL programs, you can add the path name of the MySQL bin directory to your Windows system PATH environment variable.

You should not add the MySQL bin directory to your Windows PATH if you are running multiple MySQL servers on the same machine.

Initializing the Data Directory

mysqld --initialize --console

A temporary password is generated for root@localhost: _=da(%D0z?&q

Starting the Server for the First Time

mysqld --console

Post-Initialization root Password Assignment

mysql -u root -p
ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘2020‘;

Installing MySQL on Microsoft Windows Using a noinstall ZIP Archive

标签:var   gen   sam   director   innodb   mic   generate   arc   sys   

人气教程排行