Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Graphic and text tutorial of mysql community server 8.0.16 installation and configuration method under Windows

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Recently saw a lot of MySql related syntax, Xiaobai also want to learn some MySQL stored procedure writing, so I want to install MySQL, encountered some problems in the process, here recorded ~

Step 1: Download

First, go to the official website to download the MySQL version of the matching computer, the URL is as follows: www.mysql.com/

Then, go to the download page:

1)Go to download page

2)Find the position in the red box

3) Click to download

4)Go to the download page, find the matching version on the page, click Download

5)Download and extract: D:\Users\chen_lib\mysql-8.0.16-winx64 (here Xiaobai extract to this address)

Step 2: Configure environment variables

Name: MYSQL_HOME

Variable value: D:\Users\chen_lib\mysql-8.0.16-winx64

path: %MYSQL_HOME%\bin

Step 3: Installation

1. Generate data file

At the beginning, run cmd

Enter D:\Users\chen_lib\mysql-8.0.16-winx64\bin directory, where cd, D: cannot be followed by slash, otherwise an error will be reported.

After entering this path, execute the command mysqld --initialize-insecure --user=mysql

At this point, the data directory is generated under D:\Users\chen_lib\mysql-8.0.16-winx64 directory.

2. Startup Services:

Execute command: net start mysql Start mysql service, here I encountered an error;

Solution:

Execute the command: mysqld -install

In fact, the installation was successful here, but to test, I encountered a problem when testing here, continue to go down ~

Login mysql:(Because the password was not set before, so the password is blank, do not enter the password, just enter)

Command: mysql -u root -p

There is no connection here.

Solution:

Follow this operation to find MySQL to start

Try again: Success

Next, check the password

mysql> select host,user,authentication_string from mysql.user;

You can also modify or set the user password:

Command: update mysql.user set authentication_string=password("123456") where user="root";

To take effect, you need to type the command again: flush privileges;

Exit MySql

Command: QUIT

The above is all the content of this article, I hope to help everyone's study, but also hope that everyone a lot of support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report