MySQL v5.7.18 decompression version installation detailed tutorial

MySQL v5.7.18 decompression version installation detailed tutorial

Download MySQL

https://dev.mysql.com/downloads/mysql/5.1.html#downloads

My computer is 64-bit, so I choose to download: Windows (x86, 64-bit), ZIP Archive version

Unzip and install

1. Unzip the downloaded package to the specified directory. (For me) unzip it to: D:\Program Files (x86) directory.
Therefore, the full path of the MySQL (installation) package is: D:\Program Files (x86)\mysql-5.7.18-winx64

2. After decompression, configure the system environment variables.

Add new system environment variables:

Key name: MYSQL_HOME

The value is: D:\Program Files (x86)\mysql-5.7.18-winx64

Then add in Path:%MYSQL_HOME%\bin

3. After decompression, prepare the my.ini file.

Note: (It is said) that after decompressing previous versions, there will be my-default.ini or my.ini files in the decompressed directory. However, after decompressing the v5.7.18 version, there are no such files. Therefore, you need to manually create the my.ini file. The specific (complete) content of the file is as follows:

[client]
port=3306
default-character-set=utf8
[mysqld]
port=3306
character_set_server=utf8
basedir=%MYSQL_HOME%
datadir=%MYSQL_HOME%\data
sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
[WinMySQLAdmin]
%MYSQL_HOME%\bin\mysqld.exe

After editing the my.ini file, place my.ini in the bin directory

4. Open the cmd command window as an administrator and switch the directory to the bin directory under the MySQL installation package

5. Install the MySQL database and execute the following command:

mysqld.exe -install

After executing the command, the prompt: Service successfully installed. indicates that the installation is successful

6. Initialize mysql data and create a root user with a blank password. Execute the following command:

mysqld --initialize-insecure --user=mysql

Note: The last parameter --user=mysql does not need to be added in Windows, but it seems to be very important in Unix and other systems.

After executing the command, after a while, the system will automatically generate the corresponding data directory and automatically create a root user with an empty password. This indicates that the initialization is successful.

7. Start the mysql service and execute the following command:

net start mysql

After execution, the prompt is:

MySQL service is starting..

The MySQL service has been started successfully.

Note: To log in and use mysql, the service must be started first. The same will be true in the future.

8. After the service is started, because the newly created root user has an empty password, you need to set a password first. The following commands can be executed:

mysqladmin -u root -p password Enter your new password here Enter password: Enter your old password here

After executing the above two commands, as long as the old password entered after Enter password: is correct, the new password for the root user is set successfully. After this, you will need to use the new password to log in to the root user.

Note: The newly created root user has an empty password. Therefore, when you change the root user's password for the first time, you do not need to enter any password after Enter password:. Just press Enter.

9. At this point, the decompression and installation of MySQL v5.7.18 has been completed. Therefore, you need to stop the previously started MySQL service and execute the following command:

net stop mysql

Notice:

After the above processing is completed, if you only use the command line window to perform related operations on MySQL,
For example: CREATE DATABASE xxx;
For example: CREATE TABLE xxx;
For example: SELECT * FROM XXX WHERE xxx;
For example: INSERT INTO xxx (...) VALUES(...);
like:........

As long as the corresponding sentence is grammatically correct, there is no problem. However, if you use Navicat to perform related query operations (Note: I use version v11.2.7, which is the latest version), no matter what operation you perform, the operation is actually successful, but it will also be accompanied by an error prompt, as follows:

[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

After consulting online information, the problem can be solved by executing the following statement in Navicat:

SET sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
SELECT @@sql_mode;

Log in and use MySQL

The MySQL database has been installed. Once the installation is successful, you can log in as the root user and perform data operations such as creating tables, adding, deleting, modifying, and checking data. Here is the simple process:

1. Open cmd as an administrator and switch to the bin directory of the MySQL installation directory

2.net start mysql // Description: This command starts the mysql service
mysql -u root -p // Description: This command is to log in to the root user
Enter password: The password of the root user previously set

3. After logging in correctly, you can operate the data such as adding, deleting, modifying, checking, etc. Example:

mysql> show databases; // Display all databases
mysql> select statement............
...

4. When you no longer use the database, log out of the user and stop the service by executing the following command:

mysql> quit;

5.net stop mysql

Deleting a Database

If you no longer want to use mysql, you can execute the following command:

mysqld --remove

The above is my practice record, for reference only, welcome to correct and communicate!

=== [Author: jacc.kim] & [e-mail: [email protected]] ===

The above is the detailed installation tutorial of MySQL v5.7.18 decompression version 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!

You may also be interested in:
  • MySQL 8.0.12 decompression version installation tutorial personal test!
  • mysql8.0.0 winx64.zip decompression version installation and configuration tutorial
  • MySQL 8.0.12 decompression version installation tutorial
  • Detailed graphic instructions for downloading and installing the unzipped version of MySQL 5.7.18 and starting the MySQL service
  • MySQL 8.0.13 decompression version installation and configuration method graphic tutorial
  • How to install and configure MySQL 8.0.12 decompressed version under Windows 10 with graphic tutorials
  • MySQL latest version 8.0.17 decompression version installation tutorial
  • MySQL 8.0.15 winx64 decompression version installation and configuration method graphic tutorial
  • MySQL 8.0.12 winx64 decompression version installation graphic tutorial
  • MySQL 8.0 decompression version download installation and configuration example tutorial

<<:  Problems and solutions when installing MySQL8.0.13 on Win10 system

>>:  Detailed explanation of the perfect integration solution between Serv-U FTP and AD

Recommend

Do you know what are the ways to jump routes in Vue?

Table of contents The first method: router-link (...

CSS to achieve Cyberpunk 2077 style visual effects in a few steps

background Before starting the article, let’s bri...

How to install ROS Noetic in Ubuntu 20.04

Disclaimer: Since the project requires the use of...

Example of how to optimize MySQL insert performance

MySQL Performance Optimization MySQL performance ...

What to do if the container started by docker run hangs and loses data

Scenario Description In a certain system, the fun...

Simple comparison of meta tags in html

The meta tag is used to define file information an...

The use and difference between vue3 watch and watchEffect

1.watch listener Introducing watch import { ref, ...

CSS3 sample code to achieve element arc motion

How to use CSS to control the arc movement of ele...

HTML sample code for implementing tab switching

Tab switching is also a common technology in proj...

How to use mysqladmin to get the current TPS and QPS of a MySQL instance

mysqladmin is an official mysql client program th...

HeidiSQL tool to export and import MySQL data

Sometimes, in order to facilitate the export and ...

Vue implements form data validation example code

Add rules to the el-form form: Define rules in da...