Detailed tutorial for installing mysql 8.0.12 under Windows

Detailed tutorial for installing mysql 8.0.12 under Windows

This article shares with you a detailed tutorial on how to install MySQL 8.0.12 for your reference. The specific contents are as follows

1. Installation

1. Download MySQL 8.0.12 from the official website, download link

2. After downloading, unzip it to a folder

My decompression path: C:\Program Files\MySQL8.0.12

(Put the compressed folder on drive D. If you cannot enter the specified folder through cmd, put it on drive C and there will be no problem.)

3. File configuration

First, create a new my.ini file in the unzipped path using Notepad.

The content is as follows:

[mysqld]
# Set port 3306 port=3306
# Set the installation directory of MySQL basedir=C:\Program Files\MySQL8.0.12
# Set the storage directory of MySQL database data datadir=C:\Program Files\MySQL8.0.12\Data
# Maximum number of connections allowed max_connections=200
# The number of connection failures allowed.
max_connect_errors=10
# The default character set used by the server is UTF8
character-set-server=utf8
# The default storage engine that will be used when creating a new table default-storage-engine=INNODB
#Default authentication is done with the "mysql_native_password" plugin #mysql_native_password
default_authentication_plugin=mysql_native_password
[mysql]
# Set the default character set of the mysql client to default-character-set=utf8
[client]
# Set the default port used by the mysql client to connect to the server port = 3306
default-character-set=utf8

4. Database Configuration

Enter cmd with administrator privileges and enter the bin directory where MySQL is installed. The instructions are as follows:

Then enter mysqld --initialize --console , and the following screen will appear. The red box contains the initial password of the database root user (be sure to remember or save it!), which will be needed for subsequent logins. If you accidentally turn it off or forget to remember, delete the data directory generated by initialization and execute the initialization command again to regenerate it.

Then enter mysqld --install to install the mysql service

Enter net start mysql to start the service (Note: mysqld --remove is to uninstall the MySQL service, net stop mysql is to stop the service.)

5. Enter the database configuration

Enter mysql -u root -p , and then you will be asked to enter the password. The password is the password you were asked to remember before. After entering it correctly, the following interface will appear, indicating that you have entered the MySQL command mode. (The last digit of my password was a lowercase letter l, which I mistook for the number 1. It took me several tries to figure it out.)

Then change the password and enter ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new password'; the following interface appears, indicating that the change is successful. (Note: there is a semicolon ';' at the end, and the same applies to the following)

At this point, the MySQL8.0.12 database has been installed.

2. Database related configuration

View the default database command: show databases;

Select mysql database command: use mysql

View the default MySQL user instructions: select host, user, authentication_string, plugin from user;

Create a new user: CREATE USER 'username'@'hostname' IDENTIFIED WITH mysql_native_password BY 'password'; (Set the username and password to something you can easily remember. I set the username to leo.)

Authorize the new user: GRANT ALL PRIVILEGES ON *.* TO 'user name'@'host name'; refresh permissions: FLUSH PRIVILEGES;

OK, MySQL 8.0.12 has been successfully installed on Windows, and its own user has been created. You can close the cmd window, you don’t need it anymore. Next, use the database graphical tool to use database programming.

3. Connect to Navicat database visualization tool

Share a free installation of Navicat Premium 12:

After downloading, unzip it to a disk. I unzipped it to disk D.

Find the directory where the file is located and open the program as shown below:

The software interface after opening is:

Create a new MySQL connection:

Click on the connection test to test whether the connection is successful.

So far, all configurations are completed, let's start database programming.

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Windows10 mysql 8.0.12 non-installation version configuration startup method
  • MySQL 8.0.12 decompression version installation graphic tutorial under Windows 10
  • MySQL 8.0.12 installation and configuration method graphic tutorial (Windows version)
  • MySQL 8.0.12 installation and configuration method graphic tutorial (windows10)
  • How to install and configure MySQL 8.0.12 decompressed version under Windows 10 with graphic tutorials
  • Installing MySQL 8.0.12 based on Windows

<<:  Ubuntu 18.04 does not prompt for password when installing MySQL and how to solve it

>>:  How to use JS code compiler Monaco

Recommend

9 great JavaScript framework scripts for drawing charts on the web

9 great JavaScript framework scripts for drawing ...

Summary of problems encountered in the implementation of Vue plug-ins

Table of contents Scene Introduction Plugin Imple...

Linux installation Redis implementation process and error solution

I installed redis today and some errors occurred ...

Tutorial on binary compilation and installation of MySql centos7 under Linux

// It took me a whole afternoon to install this, ...

dl, dt, dd list label examples

The dd and dt tags are used for lists. We usually...

Hyperlink icon specifications: improve article readability

1. What is the hyperlink icon specification ?<...

Detailed explanation of nginx configuration file interpretation

The nginx configuration file is mainly divided in...

Several situations where div is covered by iframe and their solutions

Similar structures: Copy code The code is as foll...

Linux touch command usage examples

Detailed explanation of linux touch command: 1. C...

Detailed explanation of JavaScript Reduce

Table of contents map filter some every findIndex...

20 JavaScript tips to help you improve development efficiency

Table of contents 1. Declare and initialize array...

Introduction and analysis of three Binlog formats in MySQL

one. Mysql Binlog format introduction Mysql binlo...