当前位置:网站首页>MySQL installation

MySQL installation

2022-06-23 14:09:00 slom_ fxt

One 、 Download the unzip file ( You can also download the installed version on the official website )

1. Go to the official website to download or go to https://www.mysql.com/downloads/  download
    Click on the following  

2. Locate the extracted file

3. Download the compressed file ( Download as needed )

 4. Unzip in the directory you want to install

Two 、 environment variable : To configure MySQL Under the table of contents bin route  

3、 ... and 、 Configure initialized profile my.ini

[mysqld]
#  Set up 3306 port 
port=3306
 
#  Set up mysql Installation directory  
basedir=D:\\mysql-8.0.28 #  Remember to use double slashes here \\, I will make a mistake here , But look   Other people's tutorial , Some are single slashes . Try it yourself  

#  Set up mysql Database data storage directory  
datadir=D:\\mysql-8.0.28\\data #  Ditto here 

#  Maximum connections allowed 
max_connections=200
 
#  Number of connection failures allowed , This is to prevent someone from trying to attack the database system from the host 
max_connect_errors=10
 
#  The character set used by the server defaults to UTF8
character-set-server=utf8
 
#  The default storage engine that will be used when creating a new table 
default-storage-engine=INNODB
 
#  By default “mysql_native_password” Plug in authentication 
default_authentication_plugin=mysql_native_password
 
[mysql]
#  Set up mysql Client default character set 
default-character-set=utf8
 
[client]
#  Set up mysql The default port and character set used by the client when connecting to the server 
port=3306
default-character-set=utf8
​

4. Load profile

1.  Run as administrator cmd, Direct input mysqld --initialize --console perform , After execution , There is a jargon Atemporary password is generated for [email protected]: gVQabdEtk4+r
@localhost: After that is root
User's initial password , This password will be used later
2. stay cmd
In the implementation of mysqld --install MySQL
3. Start the service net start MySQL
4. Login service MySQL -uroot -pgVQabdEtk4+r
5. Change Password

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';

原网站

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