MySQL Community Server compressed package installation and configuration method

MySQL Community Server compressed package installation and configuration method

Today, because I wanted to install MySQL, I went to the official website to download the latest community version of MySQL.

but! The downloaded file is a compressed package, which means we need to manually configure the MySQL environment.

Here are the steps:

1. Unzip the compressed package to your path (do not include Chinese characters). My path is: F:\software\mysql-5.7.11-winx64\

2. Configure environment variables: My Computer -> Properties -> Advanced -> Environment Variables, configure the path of the bin folder under MySQL to the PATH of the user variable, so that you can execute MySQL related commands directly in cmd in the future.

3. Modify the configuration file my-default.ini in the root directory of mysql and configure the path of mysql. There are three lines in total. The operations after the data directory will be automatically generated. Fill it in first.

4. Open the command line window as an administrator. There is a command prompt in the accessories in the start menu. Right-click it and run it as an administrator.

5. Locate the current path of the command line window to the bin folder of the mysql directory (it must be located in the bin directory), and enter the following three instructions at a time:

mysqld -install installs the mysql service

mysqld --initialize must be initialized

net start mysql starts the MySQL service.

6. Next you need to enter MySQL, so what is the username and password? ? In the new version, MySQL has changed the way passwords are generated and uses random generation. Open the data folder in the root directory of mysql (generated by initialize), find a file ending with .err and open it

There is a line that records your username (root) and the randomly generated temporary password (I(drANkaq1rf)

Next, you can log in through the command (mysql -u root -p)

7. You need to change your password after logging in

The command to change the password in versions 5.7.6 and later is:

ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass'; 

The command to change the password before 5.7.6 is:

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass') 

This completes the basic configuration.

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:
  • MySQL Community Server 5.7.19 Installation Guide (Detailed)
  • How to install the green version of MySQL Community Server 5.7.16 and implement remote login
  • Installation of mysql-community-server. 5.7.18-1.el6 under centos 6.5

<<:  jQuery plugin to implement minesweeper game (3)

>>:  How to configure multiple tomcats with Nginx load balancing under Linux

Recommend

Detailed explanation of Zabbix installation and deployment practices

Preface Zabbix is ​​one of the most mainstream op...

A brief discussion on the implementation of fuzzy query using wildcards in MySQL

In the MySQL database, when we need fuzzy query, ...

About MySQL 8.0.13 zip package installation method

MySQL 8.0.13 has a data folder by default. This f...

Question about custom attributes of html tags

In previous development, we used the default attr...

Vue uses the video tag to implement video playback

This article shares the specific code of Vue usin...

Index in MySQL

Preface Let's get straight to the point. The ...

CentOS 8 custom directory installation nginx (tutorial details)

1. Install tools and libraries # PCRE is a Perl l...

Implementation of docker view container log command

Why should we read the log? For example, if the c...

How to view available network interfaces in Linux

Preface The most common task after we install a L...

Postman automated interface testing practice

Table of contents Background Description Creating...

One line of code teaches you how to hide Linux processes

Friends always ask me how to hide Linux processes...

How to run nginx in Docker and mount the local directory into the image

1 Pull the image from hup docker pull nginx 2 Cre...

Understand CSS3 Grid layout in 10 minutes

Basic Introduction In the previous article, we in...

What is JavaScript anti-shake and throttling

Table of contents 1. Function debounce 1. What is...