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 and configure mysql 8.0.12

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

Share

Shulou(Shulou.com)05/31 Report--

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

Recorded the mysql 8.0.12 download installation tutorial and shared it with you.

As shown in the picture

After downloading, extract the installation package to any folder, and I will extract it to E disk here.

Installation

1. Create an empty folder data in E:\ mysql\ mysql-8.0.12-winx64 after decompression. If you already have this folder, you don't need to do this step.

2. Create a my.ini file, open it with notepad, and copy the following code into it.

[mysqld] # set port 3306 port=3306# set the installation directory of mysql:\\ mysql\\ mysql-8.0.12-winx64# set the directory where the data of the mysql database is stored datadir=E:\\ mysql\\ mysql-8.0.12-winx64\\ Data # Note: double\ # maximum number of connections max_connections=200# allows the number of connections to fail. This is to prevent anyone from attempting to attack the character set used by the max_connect_errors=10# server of the database system from this host. By default, the default storage engine default-storage-engine=INNODB# that UTF8character-set-server=utf8# will use when creating a new table uses the "mysql_native_password" plug-in authentication default_authentication_plugin=mysql_native_ password [MySQL] # to set the mysql client default character set default-character-set=utf8 [client] # setting. Set the port port=3306default-character-set=utf8 used by default when the mysql client connects to the server

Configure environment variables

Right-click computer-> Properties-> Advanced system Settings-> Advanced-> Environment variables

Add a variable called MYSQL_HOME to the system variable.

Modify the Path variable to add% MYSQL_HOME%\ bin at the end

Run the cmd command as an administrator and change the path to the bin directory of mysql

To initialize the database, run the command: mysqld-initialize-console

Note that in the result, the following sentence followed by the colon is the default password, write down A temporary password is generated for root@localhost: rI5rvf5x5G,E

Installation service

Run the command: mysqld-install, and mysql is installed

# Test whether the installation is successful

Run the mysql command: net start mysql

Stop the mysql command: net stop mysql

Change password

Suppose you want to change the password to 123456, run cmd, and run the command in the bin directory: mysql-u root-p

Enter the original password

Enter the statement:

ALTER USER 'root'@'localhost' IDENTIFIED BY' 123456; on "how to install and configure mysql 8.0.12" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, please 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