Mysql8.0.32 download installation configuration tutorial

download

Mysql official website download
1. Click the link to enter the official website to download.
insert image description here
After the download is complete, unzip it and put it locally, but remember this path, it will be used soon.

2. Configure the initialization file mysql.ini

Create a txt file in the root directory, name it yourself (mysql.ini), copy the following code and
place it under the file after the file suffix is ​​ini.
Except for the installation directory and data storage directory, the following codes need to be modified, and the rest do not need to be modified

[mysqld]
# 设置3306端口
port=3306
# 设置mysql的安装目录   ----------是你的文件路径-------------
basedir=E:\mysql\mysql
# 设置mysql数据库的数据的存放目录  ---------是你的文件路径data文件夹自行创建
datadir=E:\mysql\mysql\data
# 允许最大连接数
max_connections=200
# 允许连接失败的次数。
max_connect_errors=10
# 服务端使用的字符集默认为utf8mb4
character-set-server=utf8mb4
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
# 默认使用“mysql_native_password”插件认证
#mysql_native_password
default_authentication_plugin=mysql_native_password
[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8mb4
[client]
# 设置mysql客户端连接服务端时默认使用的端口
port=3306
default-character-set=utf8mb4

Initialize Mysql

Run the command line window directly as an administrator,
insert image description here
enter your own mysql/bin directory, mine is in the D drive, cd D:\mysql\mysql\bin\
and then execute the command:

mysqld --initialize --console

Copy the password after root@localhost: to the local folder and save it (there is a space after :, do not copy)
insert image description here

4. Install mysql service and start + change password

(1) Install mysql service

mysqld --install mysql

After the installation is successful, it will display
insert image description here

(2) Start the mysql service

net start mysql

insert image description here

(3) connect to mysql

mysql -uroot -p

Then after entering the above command, enter the password that was just saved locally at the bottom
insert image description here
and enter the command to change the default password to your own password

ALTER USER 'root'@'localhost' IDENTIFIED BY '新的密码';

For example:
insert image description here

5. Configure environment variables

insert image description here
Enter the following code in the path path
insert image description here

6. Use the connection tool to connect to mysql

Idea connects
insert image description here
insert image description here
to the database. The one-stop service of the database mysql has been completed here!
The operation of the database is still very important. My version is not very complete. If you think it is not possible, you can refer to the original
author
.
You can also put forward any opinions, and we will make progress together. Various types of articles will be updated in the future, please use your precious likes before leaving.

Supongo que te gusta

Origin blog.csdn.net/lj20020302/article/details/129280843
Recomendado
Clasificación