MySQL entry installation, environment configuration, initialization tutorial

One, MySQL installation (win64)

Free community edition download address: https://dev.mysql.com/downloads/mysql

MySQL download diagram
Then you will jump to this page.
MySQL download diagram
After downloading, we will unzip the zip package to the corresponding directory. Here I will put the unzipped folder under D:\Web\mysql-8.0.19-winx64 .

Open the folder D:\Web\mysql-8.0.19-winx64 that you just unzipped , create a my.ini configuration file in this folder, edit my.ini to configure the following basic information:

[mysql]
default-character-set=utf8      # 默认字符集
[mysqld]
port = 3306      # 端口
basedir=D:\MYSQL\mysql-8.0.17-winx64     # 安装路径
max_connections=20       # 最大连接数
character-set-server=utf8      # 客户端使用的字符集
default-storage-engine=INNODB   # 创建新表时将使用的默认存储引擎

Insert picture description here

Two, configure environment variables

Open My Computer->Properties->Advanced->Environment Variables, select PATH in System Variables, and add after it: the path of your mysql bin folder (such as: * D:\Web\mysql-8.0.19- Winx64 \ bin " ), an additional note is not covered, and then determine the details Figure
Insert picture description here

3. Registration Service

mysqld --initialize --consoleInitialize mysql, note down the password,
mysqld --installregister mysql service,
net start mysqlstart mysql service

In win10, enter cmd, right-click on the management prompt and select Run as administrator

After entering this page, cd to the MySQL installation directory.

Initialize the database:

mysqld --initialize --console

Guess you like

Origin blog.csdn.net/weixin_44893902/article/details/104881721