当前位置:网站首页>MySQL 8.0 installation free configuration method

MySQL 8.0 installation free configuration method

2022-06-13 02:56:00 Knowing and knowing

For different operating systems ,MySQL Corresponding versions are provided . stay Windows Under the operating system ,MySQL The database installation package is divided into graphical interface installation and installation free installation . The two packages are installed differently , The configuration is also different . The graphical interface installation package has a complete installation wizard , Easy to install and configure . The installation free installation package can be directly decompressed and used , But it is inconvenient to configure . The article mainly introduces in detail mysql 8.0.26 Installation free configuration method

1. download MySQL Compressed package

Official download address :https://dev.mysql.com/downloads/mysql/
 Insert picture description here

2. Unzip to the location you want to install

 Insert picture description here

3. establish my.ini Configure the file and move it to the directory to be installed

 Insert picture description here

4. open my.ini File edit configuration information

Reference configuration :

[mysql]
# Set up mysql Client default character set 
default-character-set=utf8
[mysqld]
# Set up 3306 port 
port =3306
# Set installation directory 
basedir=E:\MySQL\mysql-8.0.26-winx64
# Set the data storage directory 
datadir=E:\MySQL\mysql-8.0.26-winx64\data
# Maximum connections allowed 
max_connections=200
# When you create a new table, you will use the default storage engine 
default-storage-engine=INNODB

Close after save my.ini file

5. Initialize the database and install 、 Login database

1). Enter the first bin Catalog , Open a command prompt as an administrator (cmd), Initialize database

mysqld --initialize --console

Pictured :
![ Insert picture description here ](https://img-blog.csdnimg.cn/c8de99df28d94b2b831d3d41af0d24d6.png Insert picture description here
Remember the password generated in the diagram , This is a randomly generated initial password .

2). mount this database

mysql --install

 Insert picture description here

There will be more directories data Folder
 Insert picture description here
3). Start database , And log in with the initial password

// start-up 
net start mysql

Pictured :
 Insert picture description here
4). Change the password to complete the installation

Use SQL Statement modification , For example, change the password to abcd

ALTER USER 'root'@'localhost' IDENTIFIED BY 'abcd';

Exit after modification :

exit;

And then log back in , Test for successful installation .

原网站

版权声明
本文为[Knowing and knowing]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202280535119396.html