mysql installation tutorial Windows64 bit

1. Enter the official website and click on the link below

https://dev.mysql.com/downloads/mysql/

Two, select the windows version, and 64-bit

Insert picture description here

3. Unzip after downloading

Insert picture description here

Fourth, I unzipped it in the path shown in the figure

Insert picture description here

5. Under this path, create a file my.ini and fill in the following content

[client]
# 设置mysql客户端默认字符集
default-character-set=utf8
 
[mysqld]
# 设置3306端口
port = 3306
# 设置mysql的安装目录
basedir=D:\\NewProgram\\mysql-8.0.22
# 设置 mysql数据库的数据的存放目录,MySQL 8+ 不需要以下配置,系统自己生成即可,否则有可能报错
# datadir=D:\\NewProgram\\sqldata
# 允许最大连接数
max_connections=20
# 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB

And create the folder D:\NewProgram\sqldata as the storage directory for database data

6. Edit environment variables and add bin folder path to user variable path

Insert picture description here
Insert picture description here

Seven, open cmd as an administrator

Insert picture description here
Right-click and run as administrator.

8. Enter the following instructions.

1. cd \d D:\NewProgram\mysql-8.0.22\mysql-8.0.22-winx64\bin
2. mysqld --initialize --console (the initial password will appear after running this command, remember the password, and then Can be changed)
3. mysqld install
Insert picture description here
4. net start mysql
Insert picture description here

Nine, login

Enter: mysql -u root -p
and then enter the password, then log in to the database

Guess you like

Origin blog.csdn.net/Shadownow/article/details/112391002