MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

Time:2023-11-3

The following MySQL 5.7.27 Detailed Download, Installation and Configuration Tutorials

[A long time ago also recorded a MySQL8.0 installation and configuration process, if 8.0 can refer to another article below]

MySQL Download and Installation and Navicat Configuration (Super Detailed) _Kilimanjaro Dawn’s Blog – Blog_navicat configuration mysql

I. Preface

Recently had a few years ago, the project uses MySQL5.7, and MySQL8.0 is not quite the same, found this existing blog, the record is quite detailed, the experiments installed several times, the scene is almost exactly the same, very practical, reproduced for the record, easy to follow the use of view.

[Original author’s message: in the installation of MySQL will encounter a lot of problems, the blog has a lot of solutions to the problem, here I attach some links, encountered problems friends can read the reference Ha ~]

II. Download Steps

Visit the official website:https://www.mysql.com/
Slide to the bottom of the home page and select MySQL Community server under Downloads.

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

Slide to the bottom of the home page and select MySQL Community server under Downloads.

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

 Click to view the download history version

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

According to the version of your computer to download the corresponding ZIP file, my computer is 64-bit, so choose this to download, click Download will enter the following interface:

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

Manually selectable history version

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

Click [No thanks,just start my download] Download directly without logging in, wait a while for a download pop-up window.

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

Just click on [Save] and start the download

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial


Once downloaded extract the files to the disk and directory you want to save them to. I extracted the files to the E:\Program Files\Mysql directory.

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

The above completes the download in its entirety.

II. Configuring Environment Variables

1, right-click this computer -> Properties -> Advanced System Settings -> Environment Variables -> System Variables

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

 Click New, the variable is named:MYSQL_HOMEincreaseLocation of your mysql-5.7.27-winx64 folder
Mine is inE:\Program Files\Mysql\mysql-5.7.27-winx64, as shown:

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

2、Edit Path

make a copy of%MYSQL_HOME%\binto the back of the original value, as shown:

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

3. Configure the my.ini file.

In your mysql-5.7.27-winx64 directoryCreate a new my.ini fileMine is in theE:\Program Files\Mysql\mysql-5.7.27-winx64 directoryNew construction.

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

 The contents of the my.ini file are: If the installation directory is different, remember to change the MySQL installation path.

[mysqld]
# port number
port = 3306
Path to #mysql-5.7.27-winx64
basedir=E:\Program Files\Mysql\mysql-5.7.27-winx64
Path to #mysql-5.7.27-winx64+\data
datadir=E:\Program Files\Mysql\mysql-5.7.27-winx64\data 
# Maximum number of connections
max_connections=200
# encoding
character-set-server=utf8

default-storage-engine=INNODB

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

[mysql]
# encoding
default-character-set=utf8

Once created go to the next step.

4. Install MySQL

(1) In the input box, entercmdin order toRun as an administratorWatch this space.Always, always, always run as an administrator.line, otherwise the installation process will be caused by insufficient administrative privileges to theInstall/Remove of the Service Denied!This is very important!

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial


(2) IncmdInto theE:\Program Files\Mysql\mysql-5.7.27-winx64\binCatalog.

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial


Enter the install command:mysqld  -installIf there is aService successfully installed, proving that the installation was successful; if theInstall of the Service Denied, then it means that cmd is not being run with administrator privileges:

 MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

Then continue entering commands:mysqld  –initialize, there will be no prompting at this point:

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

Enter the startup command again:net start mysqlThe following message appearsProof of successful MySQL startup

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

5. Setting MySQL Password

(1) Setting a password here is mainly a solution:ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: NO)exclusionary rule
(2) First stop MySQL service, enter the command line net stop mysql

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

(3) InFind my.ini in the E:\Program Files\Mysql\mysql-5.7.27-winx64 directory., add the following line under the [mysqld] fieldskip-grant-tablesYou can save it:If the installation directory is different, remember to change the MySQL installation path.

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

(4) Restart MySQL and enter the startup command:net start mysqlThe following message appears to prove that MySQL has started successfully:

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

After entering the commandmysql -u root -pYou don’t need to enter a password, just enter:

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

Entering MySQL was successful! Haha, it should be worth being happy after coming to this step!

(5) Entering the command lineuse mysql, into the database:

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

(6) Enter command lineupdate user set authentication_string=password(“xxxxxx”) where user=”root”;

xxxxxx is the new password you set, if the following message appears after you hit enter, it proves that the modification is successful!Don’t forget the semicolon at the end.

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

(7) Manually stop the MySQL service by typing in the win10 search barserviceFindMySQL. Just right click and then click Stop.

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

Then in the my.ini file you just deleted theskip-grant-tablesThis line, save close.

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

(8) Re-startcmd(as administrator), enter the startup command:net start mysqlThen entermysql -u root  -pWhen you enter the password you just set, the following message appears to prove that the setting is successful!

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

Then enter the command lineuse mysqlVerify it and it reports an error:

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

Since you haven’t reset your password, just do it
Type the command linealter user user() identified by “xxxxxx”;

My password is 123456, so I type inalter user user() identified by “123456”;Back to the car! Getting closer to victory!
Enter the command line againuse mysqlVerify that it worked!

MySQL 5.7 Detailed Download, Installation and Configuration Tutorial

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — the following no body — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — ————————-

Note:For learning purposes only, to record questions and references, and for mutual encouragement!

Refer to the documentation:

1、mysql5.7 above configuration my.ini_baidu_41909653’s blog – blog_mysql5.7my.ini

2、mysql ERROR 1045 (28000): Access denied for user ‘ODBC’@’localhost’ (using password: YES)_weixin_41688619 blog_blog_mysql odbc password

3、mysql ERROR 1045 (28000): Access denied for user ‘ODBC’@’localhost’ (using password: YES)_weixin_41688619 blog_blog_mysql odbc password

4、ERROR 1054 (42S22): Unknown column ‘password’ in ‘field list’_Swordsman365’s Blog-Blog

5、【mysql】You must reset your password using ALTER USER statement before executing this statement._Joker_Ye’s blog – Blog

Link to original article:MySQL 5.7.27 Detailed Download and Installation Configuration Tutorial_ZZZZhonngger’s Blog – Blog_mysql Installation Tutorial 5.7

Recommended Today

uniapp and applet set tabBar and show and hide tabBar

(1) Set the tabBar: uni.setTabberItem({}); wx.setTabberItem({}); indexnumberisWhich item of the tabBar, counting from the left, is indexed from 0.textstringnoButton text on tabiconPathstringnoImage PathselectedIconPathstringnoImage path when selectedpagePathstringnoPage absolute pathvisiblebooleannotab Whether to display uni.setTabBarItem({ index: 0, text: ‘text’, iconPath: ‘/path/to/iconPath’, selectedIconPath: ‘/path/to/selectedIconPath’, pagePath: ‘pages/home/home’ }) wx.setTabBarItem({ index: 0, text: ‘text’, iconPath: ‘/path/to/iconPath’, selectedIconPath: ‘/path/to/selectedIconPath’, pagePath: ‘pages/home/home’ }) […]