I will explain the installation of MySQL under Windows 64-bit. Starting from 5.7, the installation version of MySQL is only available for 32-bit download. Here I will explain how to install the decompressed version of MySQL. Installing the decompressed version of MySQL is also a headache for novice editors. Various problems are not as convenient as the installation version that can be easily solved with one click. There are three points to pay attention to during installation: 1. Path configuration, 2. The MySQL port is occupied during installation and the occupied port needs to be closed, 3. CMD must be used to set MySQL information under the administrator environment. MySQL official website: https://www.mysql.com/downloads/ https://www.jb51.net/softs/451120.html Methods/Steps 1. I will not talk about the download and installation of MySQL for the installation version. Here I will give the installation version interface operation according to the picture, as shown in the figure below: 2. Now let's get into the topic. Installing MySQL also needs to be done step by step. You must follow the order, otherwise the installation process will become cumbersome and annoying if an error is reported. Here I post my installation process and some of the error problems, as shown in the figure: 3. Enter the above picture and scroll down to select the button under MySQL Community Edition (GOL) to enter the download connection interface (scroll down the page) as shown in the figure: 4. Choose the download version according to your computer system. You need to log in with an Oracle account when downloading. If you don’t have one, you can register yourself. After registration, the download link will pop up automatically. You can choose the DIY path according to your preference. I choose the E drive to download. 5. After downloading, unzip it by yourself. The my-default.ini file and data file will be missing after unzipping. The great people at the god level directly configure the built-in my-default.ini file. I can only create a new my.ini file and then configure the my.ini file. Don't forget to create a new empty data file here. 6. The my.ini file is configured as follows: [client] port=3306 default-character-set=utf8 [mysqld] #Set the installation directory of mysql basedir=E:\MySQL\mysql-5.7.20-winx64\mysql-5.7.20-winx64 #Set mysql data directory datadir=E:\MySQL\mysql-5.7.20-winx64\mysql-5.7.20-winx64\data character_set_server=utf8 sql_mode=NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER # Enable query cache explicit_defaults_for_timestamp=true skip-grant-tables 7. After following the steps above, you may be a little impatient. Don't worry, you still need to configure the MySQL path: right-click the computer icon on the desktop > Properties (R) > Advanced system settings > Environment variables (N) > find Path and copy the downloaded and unzipped path. For example, mine is: ;E:\MySQL\mysql-5.7.20-winx64\mysql-5.7.20-winx64\bin; Note that you need to add ; to separate Method/Step 2 1. The installation of MySQL-5.7.20 decompressed version requires cmd to be run as an administrator. This step is very important. If you do not run it as an administrator and directly enter the dos command, it will report "the command file cannot be found" or "not an internal specified command or external command". In this case, you must enter the cmd administrator to run and enter the MySQL path dos command to enter the bin file in the MySQL decompressed directory to perform the following operations: Here I take the path under my decompressed path E drive as an example: E: Enter E: \> cd MySQL\mysql-5.7.20-winx64\mysql-5.7.20-winx64\bin Enter E:\> MySQL\mysql-5.7.20-winx64\mysql-5.7.20-winx64\bin>mysqld -install (this step is to install MySQL, press Enter) The message Service successfully installed appears, indicating that the MySQL service has been installed and needs to be started. E:\>MySQL\mysql-5.7.20-winx64\mysql-5.7.20-winx64\bin>net start mysql If the startup is successful, it means that the MySQL server has been installed Set password address: http://blog.csdn.net/JLongSL/article/details/56484762 2. The most common error in installing the decompressed version is that there are no my.ini and data files when decompressing. We need to manually configure and create them. The my.ini and data files need to be created in the path when you decompress. If the my.ini file is configured but the data file is not created, an error will be reported because the data file cannot be found. The condition and reason for the error is that you have not created an empty data file in the specified path or have not created this data file: as shown in the figure below: 3. Now go back to the system disk where you downloaded and unzipped MySQL and create an empty data file. Then execute the DOS command: net start mysql (it must be executed on the original operation) and you will find that some accessory folders appear in the data file. Successful operation is as shown below: 4. Follow step 3 and it still fails to start and reports: ERROR 2003<HY000>: Can't to MySQL server on 'localhost'(10061) or a sentence with a similar meaning, which tells you that the local server is not started. At this time, we go to start the server (open Computer -> Manage -> Services and Applications -> Services) and find MySQL startup but still get an error. This is because our MySQL port is occupied by other programs. However, the problem still occurs even after the editor closes the occupied program, so I spent a lot of time looking for it. There are many good solutions on the Internet, but I finally concluded that I used the dumbest method to use the mysqld -remove command in the dos command port to remove the newly installed MySQL, close all programs, shut down and restart the computer. 5. After restarting, I installed it again according to the online information and the method I summarized, and it was installed directly and smoothly. Start the server again (open Computer -> Management -> Services and Applications -> Services) and find MySQL to start. However, it is already started. I will test whether my visualization tool Navicat for MySQL can connect normally. As shown in the following figure, it has been connected normally: Summarize The above is the detailed steps of the installation method of the decompressed version of MySQL 5.7.20 (two methods) 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:
|
<<: Use Docker to run multiple PHP versions on the server
>>: Example of implementing skeleton screen with Vue
There are two ways to delete data in MySQL: Trunc...
Exposing network ports In fact, there are two par...
The layout of text has some formatting requiremen...
Mysql slow query explanation The MySQL slow query...
Table of contents 1. Insert 2. Update 3. Delete 1...
Recently, when I installed MySQL in Docker, I fou...
When optimizing a website, we must learn to use e...
Table of contents Preface 1. Background 2. Simula...
This article mainly introduces the implementation...
background Two network cards are configured for t...
Achieve results Implementation Code <h1>123...
Table of contents Thoughts triggered by an online...
Table of contents Preface Install vue-i18n Config...
Table of contents Preface Solution Tool Introduct...
MySQL 5.7 and above versions provide direct query...