Ultra-detailed installation of MySQL on Windows (including solving the loss of VCRUNTIME140_1.dll)

1. Download
to MySQL official website : https://www.mysql.com/downloads/
or to Baidu Cloud: link: https://pan.baidu.com/s/1sf1wGV_sIhrHZW4z1zdGlA
Extraction code: p0g3 Insert picture description here
pull to the following click:
Insert picture description here
select red Box:
Insert picture description here
Choose your own system here, the window is as shown in the figure:Insert picture description here2. Unzip and install:
unzip the downloaded file, generally (build a MySQL folder in the Program Files file on the C drive) unzip the file there, I will directly unzip it on the D drive; this is the
Insert picture description here
folder you unzip Create a my.ini configuration file
Insert picture description here
in Notepad to open and edit my.ini to configure the following basic information, modify the installation directory by yourself (the path of the folder you unzipped, remember to be the two slashes) , the storage path of the picture below is also changed No need for general 8.0+:

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

Insert picture description here3. Configure the MySQL configuration file:
Open the cmd command line tool as an administrator; first enter the disk you installed, and then switch the directory (your own installation directory)

cd /d D:\mysql-8.0.19-winx64\bin

Initialize the database:

mysqld --initialize --console

If the following picture appears, https://pan.baidu.com/s/1j6ZAGgXKRbhK6Lw4jNbIOw
extraction code: a95p
download and run 64-bit running x64, 32-bit X86 can be solved

Insert picture description here
After the execution is complete, the initial default password of the root user will be output, such as:

...
2020-04-01T10:37:41.202585Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: D%eX4vG=>fo3
...

* ~~ D%eX4vG=>fo3 ~~ *** is the initial password, which is required for subsequent logins. You can also change the password after login.

Enter the following installation command:

mysqld install

Start and enter the following command:

net start mysql

4. Startup:
When the MySQL service is running, we can log in to the MySQL database through the client tool that comes with MySQL. First, open the command prompt and enter the name in the following format:

mysql -h 主机名 -u 用户名 -p

Parameter Description:

-h: Specify the MySQL host name that the client wants to log in. This parameter can be omitted when logging in to the machine (localhost or 127.0.0.1);
-u: the user name to log in;
-p: tell the server to use a password to log in The user name and password to log in is empty, you can ignore this option.

If we want to log in to the local MySQL database, we only need to enter the following command:

mysql -u root -p

Press Enter to confirm. If the installation is correct and MySQL is running, you will get the following response:

Enter password:

If the password exists, enter the password to log in, if not, press Enter to log in. After successful login, you will see the prompt of Welcome to the MySQL monitor….
Then the command prompt will always wait for the input of the command with mysq> plus a blinking cursor, and enter exit or quit to log out.

MySQL interface SQLyong.exe installs
MySQL to modify the initial password: https://blog.csdn.net/weixin_46083166/article/details/105266091
Basic CRUD operations of MySQL database: https://blog.csdn.net/weixin_46083166/article/ details/105294842
CRUD operation of MySQL table structure: https://blog.csdn.net/weixin_46083166/article/details/105298325 CRUD operation of
MySQL table data: https://blog.csdn.net/weixin_46083166/article/details/ 105338497

Guess you like

Origin blog.csdn.net/weixin_46083166/article/details/105249430