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

Windows install mysql

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

1. Download the installation package

Mysql official website: http://dev.mysql.com/downloads/mysql/

Download to the specified directory folder, I put it in F:\ mysql, and the decompressed files are also put in the changed directory.

two。 Configure environment variables

Do not want to cd to the bin directory of mysql to execute the mysql command every time

Right click on my computer-> Properties-> Advanced system Settings-> Environment variables-> path- > Edit, and put the full path of the bin directory of the downloaded mysql in it: F:\ mysql\ mysql-8.0.16-winx64\ bin; separated by semicolons.

3. Install and start mysql

Open cmd

Enter mysqld-- initialize-insecure to automatically generate password-free root users to complete initialization (version 5.7 and later)

Enter mysqld install to enter and run, and the installation will be successful.

Enter net start mysql to start mysql (or open the windows service to start mysql manually)

If the startup error occurs: the system can not find the specified file, it may be that the system has installed mysql before.

Windows+r enter regedit in the running dialog box, click OK to enter the Registry Editor. Select HKEY_LOCAL_MACHINE-> SYSTEM-> CurrentControlSet-> services-> MySQL, and change the path of ImagePath to the Mysql installation path, for example: "F:\ mysql\ mysql-8.0.16-winx64\ bin\ mysqld" MySQL

4. Enter the mysql environment

Open cmd

Enter mysql-uroot

Set a password for root

Alter user root@localhost identified by 'redhat'

5. Use mysql

Log in with the set password

Mysql-uroot-p

View the current library

Show databases

Reference documentation:

Https://www.cnblogs.com/lmh3072005/p/5656392.html

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

Servers

Wechat

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

12
Report