Get the App
SLTechnology News&Howtos  ›  Database  › 

Graphic and text tutorial on the configuration method of MySQL5.7.17 winx64 installation under Windows server 2008 R2

Shulou Source: shulou.com Published: 2022-06-01 03:01:57 09月22日 Update

Install mysql5.7 under win for your reference. The details are as follows

@ Author GQ April 4, 2017 just bought an Aliyun winServer 2008R2 Standard Edition. You need to install a MySql database. The hole along the way has been filled up.

Download https://dev.mysql.com/downloads/mysql/ zip format from 1.MySql official website

two。 Extract to server C disk directory, customizable

3. There is a my-defult.ini configuration file by default (note that there is no data file in the directory (generate data file to read down) 4. Cut to the mysql/bin directory in cmd and execute mysqld-install to install the MySql service

Will prompt the service to install successfully

Note here that if you don't edit anything, just follow these steps to start:

Cmd enter services.msc to enter the service, find Mysql to start the service directly, it will prompt failure!

Failed to start mysql service

5. When installing mysql version 5.7 +, if you find that the data folder is missing in the root directory, please do not copy the data folder of other versions, because this operation will cause many potential problems. If you copy it, please delete it first.

You need to automatically generate the data directory and execute it in cmd.

Mysqld-initialize-insecure-user=mysql

6. At this point, the directory is complete. Open my-defult.ini and edit as follows:

Just configure it according to your own directory. Then start the MySql service again:

MySql started successfully.

7. Then open cmd and enter directly with the mysql-u root-p password under the mysql/bin directory:

If prompted "not internal or external commands", pay attention to whether the directory is wrong, or to configure environment variables, how to configure, please program for Baidu.

8. The default MySql does not have a password, which needs to be changed manually

Mysql > set password = password ('your password'); mysql > flush privileges

9. Connecting to MySql with a visual tool will indicate that the current ip cannot connect. Authorization is required for root.

Mysql > grant all on *. * to 'root'@'%' IDENTIFIED BY' your password 'with grant option; mysql > flush privileges

10. Try to connect again and you can enter.

11. If you forget your password, you can go to MySql to change the password of user table.

Mysql > use mysql;mysql > update user set password=password ('your password') where user='root'; mysql > flush privileges

The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.

Tags: Password directory service file configuration prompt success content again folder version build variable command that is tool case manual copy data Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Redmi MariaDB Shulou Information Xiaomi