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 on installation and configuration of mysql 8.0.12 decompressed version under Windows10

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Record the installation and configuration method of mysql 8.0.12 decompressed version and share it with you.

Installation environment: Window10 Home Edition, 64-bit

Database: MySQL8.0.12 64-bit

Installation method: compressed package installation

Installation steps:

1. Download the installation package

Download the latest installation package from the MySQL official website

Directly click on the bottom "No thanks, just start my download." You can start downloading the compressed package after the download is successful

Note: when installing the database, the logged in user must have Administrator privileges.

2. Unpack the package and put it in the directory where you will install it.

The decompressed file structure is shown in the figure:

From the unzipped document structure, we can see that there is no my.ini configuration file, here you need to create your own my.ini configuration file.

3. Create a my.ini configuration file

# Database server configuration item [mysqld] # Database path basedir=D:\\ Programs\\ MySQL\\ MySQL-8.0.12-winx64# data path datadir=D:\\ Programs\\ MySQL\\ data# port number port=3306# default character set character-set-server=utf8mb4# storage engine default-storage-engine=INNODB# client configuration item [mysql] # default character set default-character-set=utf8mb4# connection client configuration item [client] default-character-set=utf8mb4

Once the configuration file is created, you can proceed to the next step of installation.

4. Initialize MySQL with operation instructions

Open the terminal and go to the bin directory under the data installation path:

Enter the command "mysqld-initialize-console" in the terminal and press enter to complete the initialization:

Note: do not close the window after initialization, because the password of the root user will be generated here, and the "p=brffHdg4T5" in the figure is a random password.

Of course, there is another initialization method that does not generate random passwords, but you also need to set the password before officially using the database. The initialization instruction is "mysqld-initialize-insecure-console". When initializing the database with no random password, the first login data needs to use "mysql-u root-skip-password", that is, skip password verification.

5. Database service installation

Once the database is initialized, the data can be registered as a Windows service so that the database can be started as a service. Open the terminal and go to the bin directory under the data installation path, as shown in figure 1 in step 4.

Use the command "mysqld-install" to complete the installation of the service:

Note: when registering the service, it must be performed as an administrator, otherwise it will be rejected when installing the service.

At the same time, you can use the directive "mysqld-remove" to remove registered services.

In fact, the complete instruction for registering the service is "mysqld-install service name". If the service name is not written, it defaults to "MySQL". The service removal instruction is also "mysqld-remove service name", and the default value is "MySQL".

6. Service startup

Use the command "NET start MySQL" in the terminal to start the database service:

Verify whether the service has been started, and try to log in to the database on the terminal page. The password you need to enter here is the random password generated by the system during initialization in step 4, figure 2. You can enter it:

Landing is successful! Before executing the instruction, the system forces you to change the random password at initialization:

Using the command "ALTER USER 'root'@'localhost' IDENTIFIED BY' my_new_psd';", press enter:

After changing the password, you can use the database normally!

Use client tools to connect to the database:

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.

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