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

How to install mysql in cmd

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

Share

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

This article will explain in detail how to install mysql in cmd. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

To install mysql in cmd:

Download the installation package

Web site: https://dev.mysql.com/downloads/mysql/

Second, install mysql

1. Extract the downloaded installation package to the specified directory (remember the decompression address)

2. Open the cmd window as an administrator and change the directory to the bin directory where you extracted the files.

3. Use the mysqld install command to install

4. Execute the following command

Mysqld-initialize-insecure-user=mysql

After executing the above command, MySQL will create a data folder and default database. The login user name is root and the password is empty.

5. Start the service

Start the mysql service by executing the following command

Net start mysql

6. Command to log in and change the password

Mysql-u root-p

The default password is empty

Set password

Update user set password=password ("123456") where user= "root"

7. Refresh permissions:

Flush privileges

8. Exit:

Quit

Note: this configuration mode is applicable to MySQL version 5.7 and below.

Version 5.7 has fewer data directories than the previous version, so it is not suitable for this kind of installation.

On how to install mysql in cmd to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

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