Win10 64-bit MySQL8.0 download and installation tutorial diagram

Win10 64-bit MySQL8.0 download and installation tutorial diagram

How do I download MySQL from the official website, install it, and log in to the client? This article explains it clearly to you.

Step 1: Download from the MySQL official website.

Find the required win10 64-bit mysql from [https://dev.mysql.com/downloads/mysql/](https://dev.mysql.com/downloads/mysql/)

Click download and you will be redirected to the download page as shown below. In the past, I downloaded directly using the browser's default downloader. Now Oracle wants to have more users, so it hopes that users will log in before downloading. However, there is still an entrance for direct download without logging in, which is in the red box in the picture below. No thanks, just start my download. Click the browser to start downloading, as shown in the figure.

Downloading to hard drive is like this:

This is what it looks like after decompression: Pay attention to the folder path after decompression, because this path determines the path of the MySQL database server. The red one is the self-defined path, and the following is the unzipped folder.

Note: Because MySQL is constantly improving, there are more and more things to consider, and the official website is constantly changing, but remember that the downloaded things will definitely not change. Here we are looking for the homepage - community - mysql community service, and the downloaded file is in zip format; if it is MySQL on windows, the downloaded file is in msi format. These two formats are interesting. The zip format can be used directly after decompression, but many things need to be configured manually; the msi format is installed step by step according to the pop-up wizard. They are two completely different methods, but the final results are the same, that is, after the zip is decompressed, the result obtained by manual configuration is the result generated by the MSI format after step-by-step booting. MSI is a program installation data package for Windows installers, which is very similar to EXE files. ZIP files are compressed format files. We use the zip decompression configuration method and explain what the msi installation process does.

During the decompression process, the compressed package is 182M, and after decompression it is 829M, which is actually quite large. The decompression took about a minute, which is quite long. The msi installation package on the official website is only 15.9M, and after installing it step by step, the result is also 829M. What does this mean? The zip compressed package is the result folder after the msi installation package is installed. However, we configure the environment variables and add services ourselves in the end, and the result is the same as the msi installation. Moreover, the zip compression package method can better achieve low coupling with the system.

Step 2: Configure environment variables

An environment variable is a directory recognized by the system. The purpose of configuring environment variables is to allow the system to find commands under the configured path in any directory.

This is the file directory of mysql8.0. What we need to configure is the bin directory in this directory.

You can find the environment variables by pressing Computer--Properties--Advanced System Settings--Environment Variables

Click Path under System Variables, then click Edit, then click New, and copy and paste the mysql bin path directly below. Then confirm.

Step 3: Configure Mysql's my.ini file

Create a new my.ini file under the unzipped mysql root directory file. The blue box is the mysql root directory, and the green box is where we want to create the my.ini file, which is a configuration setting file

Copy the following part into the my.ini file

[client]port=3306default-character-set=utf8

[mysqld]# Set the server's access port and character set port=3306 character_set_server=utf8 # Allow the maximum number of connections max_connections=20 # Set to your own MYSQL installation directory basedir=C:\application\program\mysql\mysql-8.0.12-winx64 # Set to MYSQL's data directory datadir=C:\application\program\mysql\mysql-8.0.12-winx64\data # The default storage engine to be used when creating a new table default-storage-engine=INNODB

Note that the above basedir and datadir property values ​​are your own MySQL root path.

Step 4: Initialize MySQL

Execute the --initialize command. Open a cmd command window as an administrator. Type: mysqld --initialize --user=mysql --console and press Enter.

The red box below is the command you executed. Note that the green box is your initial password. This must be remembered and can be copied into a text file for saving.

Then execute the mysqld --install command. See below that the service is successfully installed. That is, the wins service is installed.

The service can be seen in Task Manager-Services. My service name is mysqlSun. Just follow the service name you want when mysqld --install mysqlSun The default service name is mysql. The command to delete the service is: mysqld --remove mysqlSun . At this time my mysql service is closed. Next we start the service.

Execute net start mysql to start the service. Only when the service is turned on can the database be linked and operated. As shown below, the MySQL server is now started.

Step 5: Log in to the database

After starting the service, continue to execute mysql -u root -p . You will be asked to enter a password. At this time, you should copy the default password given to you by mysql above. Enter the password and press Enter.

After entering the password and pressing Enter, when the following Welcome... message is displayed, congratulations! Only then is the mysql data successfully installed. It’s a green installation, a zip decompression version, which you don’t have to uninstall when you don’t want it.

Don't forget, what you need to do at this time is to change the password. You can't always use the particularly complex default password that MySQL gives you, right?

Execute set password='123' ; the password is now changed to the number 123. Note that you must include a semicolon when executing the command because it is a data operation command.

At this time, you can execute the quit command to exit the database, then re-execute the previous step mysql -u root -p and enter the password to log in to the database again. This is completely dependent on your database. The account is root and the password is 123. If you only use this database for development, you don't need to set a difficult password, because if you forget the password, there is only one way left, which is to completely uninstall and reinstall MySQL.

End: Use the mysql client to connect to mysql

The mysql client can be navicat or SQLyog. I will take SQLyog as an example here. I won’t talk about how to download, install and crack SQLyog. Here I will only provide the SQLyog activation code because this is the most useful.

name:xxxsn:dd987f34-f358-4894-bd0f-21f3f04be9c1

Open SQLyog, then File - New Connection - New

Create a new name clientTest, then confirm and enter the database password, etc.

First click the test link. Generally, MySQL is version 8.0, which is a relatively new version. If the client version is not high, error 1251 will occur. The reason is that the MySQL version is too high and uses a new client password verification method, but the old client does not have this password login method. So it needs to be solved.

In the command window login state, execute

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your password'; #Modify encryption rules FLUSH PRIVILEGES; #Refresh permissions

Then go to SQLyog and click Test to solidify, and it will be successful. It also shows your mysql version number.

Click OK, then click Connect to connect to the database. Did you see it? [email protected] is your user, yours should be root@localhost, localhost is 127.0.0.1, this is the IP address. As a user, MySQL gives you four databases by default, and each database has many tables. Next we create a database ourselves.

Right click on your username and click Create Database. Name it firstdatabase. This creates a database called firstdatabase under your id.

From downloading the database to the final configuration of the client is in this article. Hope this helps.

Summarize

The above is the tutorial illustration of MySQL download and installation of win10 64-bit MySQL8.0 introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • MySQL 8.0.23 installation and configuration method graphic tutorial under win10
  • MySQL 8.0.18 installation and configuration method graphic tutorial under win10 (windows version)
  • Installation and configuration tutorial of MySQL 8.0.16 under Win10
  • MySQL 8.0.12 installation and environment variable configuration tutorial under win10
  • MySQL 8.0.15 installation and configuration graphic tutorial under Win10
  • How to install mysql8.0.23 under win10 and solve the problem of "the service does not respond to the control function"

<<:  Linux file and user management practice

>>:  Graphical explanation of the function call of proto file in Vue

Recommend

Vue: Detailed explanation of memory leaks

What is a memory leak? A memory leak means that a...

How to improve MySQL Limit query performance

In MySQL database operations, we always hope to a...

CSS and HTML and front-end technology layer diagram

Front-end technology layer (The picture is a bit e...

Analysis of the use of Linux vulnerability scanning tool lynis

Preface: Lynis is a security audit and hardening ...

Deep understanding of JavaScript syntax and code structure

Table of contents Overview Functionality and read...

How to change the color of the entire row (tr) when the mouse stops in HTML

Use pure CSS to change the background color of a ...

Summary of Mysql common benchmark commands

mysqlslap Common parameter description –auto-gene...

In-depth analysis of MySQL lock blocking

In daily maintenance, threads are often blocked, ...

Detailed steps for quick installation of openshift

The fastest way to experience the latest version ...

JavaScript Closures Explained

Table of contents 1. What is a closure? 2. The ro...

Detailed implementation plan of Vue front-end exporting Excel files

Table of contents 1. Technology Selection 2. Tech...

Detailed explanation of JavaScript array deduplication

Table of contents 1. Array deduplication 2. Dedup...

Vue implements div wheel zooming in and out

Implement div wheel zooming in and out in Vue pro...