MySQL 5.7.24 installation and configuration method graphic tutorial

MySQL 5.7.24 installation and configuration method graphic tutorial

MySQL is the most popular relational database management system. In terms of WEB applications, MySQL is one of the best RDBMS (Relational Database Management System) application software.

1. Download the MySQL installation package

Open the website to download MySQL (MySQL download address link)

The default link to this website is the latest version of MySQL, so if you need to download version 5.7, you need to click the link in the picture below to download it.

Select the version that corresponds to your computer, which is generally a 64-bit computer.

Next, click Download and select No thanks, just start my download to download the installation package directly.

2. Unzip to the corresponding folder

The downloaded file is a compressed file, unzip it to the directory you want to put it in.

Configure MySQL environment variables, system variables--->New---->Variable name MYSQL_HOME, variable value is your path name

My variable name is: C:\MySQL\mysql-5.7.24-winx64

Then change the Path environment variable and add the following value: %MYSQL_HOME%\bin

3. my.ini file

There is no data folder and my.ini file in the folder you unzipped, so add an empty data folder and a my.ini file.

The contents of the my.ini file are as follows

[mysql]
# Set the default character set of the mysql client to default-character-set=utf8 
[mysqld]
#Set port 3306 port = 3306 
# Set the installation directory of mysql to basedir=C:\MySQL\mysql-5.7.24-winx64
# Set the storage directory of MySQL database data datadir=C:\MySQL\mysql-5.7.24-winx64\data
# Maximum number of connections allowed max_connections=200
# The default character set used by the server is the 8-bit latin1 character set character-set-server=utf8
# The default storage engine that will be used when creating a new table default-storage-engine=INNODB 

4. Install MySQL service and initialize

Run cmd as an administrator and execute the command to install the mysql service:

mysqld install

We can see that the service has been successfully installed.

If the installation fails, it may be because you installed it before but did not uninstall it completely, so be sure to uninstall it completely.

Then execute the mysql initialization command:

msqld --initialize 

Execute this command and start our mysql:

net start mysql 

The following errors may occur here

The solution is to enter our MySQL decompression package, delete the data folder, and then re-execute the command:

mysqld --initialize

Execute: net start mysql and you will find that the service is started successfully.

After successful startup, we log in. Since there is a default password during initialization, where can we find the default password?

In the file ending with err under our data folder.

Execute the command:

mysql -u root -p

Enter the password found above: EcpHl,h33/N), then log in and change the default root password:

alter user root@localhost identified by '123456';

Finally, let’s talk about how to set the username and password for remote connection:

We use Navicat for user management. When adding a new user, you can see the host input box. When setting it up, if you want the user to be able to connect remotely, please enter %. If it is for local connection, please enter localhost

Wonderful topic sharing:

MySQL different versions installation tutorial

MySQL 5.6 installation tutorials for various versions

MySQL 5.7 installation tutorials for various versions

mysql8.0 installation tutorials for various versions

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:
  • Detailed tutorial on compiling and installing MySQL 5.7.24 on CentOS7
  • Centos7.5 installs mysql5.7.24 binary package deployment
  • The perfect solution for MYSQL5.7.24 installation without data directory and my-default.ini and service failure to start
  • Detailed graphic description of the database installation process of MySQL version 5.7.24
  • MySQL 5.7.24 installation and configuration graphic tutorial
  • How to install mysql5.7.24 binary version on Centos 7 and how to solve it
  • Summary of installation steps and problems encountered in decompressing the mysql5.7.24 version
  • MySQL 5.7.24 compressed package installation and configuration method graphic tutorial

<<:  Nginx uses reverse proxy to implement load balancing process analysis

>>:  In-depth explanation of modes and environment variables in Vue CLI

Recommend

Problems and solutions encountered when installing mininet on Ubuntu 16.04.4LTS

Mininet Mininet is a lightweight software defined...

How does MySQL implement ACID transactions?

Preface Recently, during an interview, I was aske...

The reason why MySQL uses B+ tree as its underlying data structure

We all know that the underlying data structure of...

WeChat applet picker multi-column selector (mode = multiSelector)

Table of contents 1. Effect diagram (multiple col...

WeChat applet implements a simple calculator

WeChat applet's simple calculator is for your...

Tutorial on how to install htop on CentOS 8

If you are looking to monitor your system interac...

How to configure multiple projects with the same domain name in Nginx

There are two ways to configure multiple projects...

Vue realizes the card flip effect

This article example shares the specific code of ...

Definition and function of zoom:1 attribute in CSS

Today I was asked what the zoom attribute in CSS ...

Quickly install MySQL5.7 compressed package on Windows

This article shares with you how to install the M...

Linux sftp command usage

Concept of SFTP sftp is the abbreviation of Secur...