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 the mysql 8.0.16 package

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Editor to share with you how to install the mysql 8.0.16 package configuration, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

The details are as follows

Operating environment: Windows 10 x64

1. Download the zip installation package:

Download address of MySQL8.0 For Windows zip package: you don't have to log in after entering the page. Then click on the bottom "No thanks, just start my download." You can start downloading.

2. Installation

2.1 extract the zip package to the installation directory

My decompression is at E:\ SQL\ MySQL\ mysql-8.0.16-winx64

Ps: extracted file directory, missing data folder and my.ini configuration file

Add the extracted bin path to the environment variable path

2.2 configure the initialized my.ini file

Note: be sure to open the folder extension

Add my.ini (create a new text file, change the file type to .ini) under the installation root, and write to the basic configuration:

[mysqld] # set port 3306 port=3306 # set mysql installation directory basedir=E:\ SQL\ MySQL\ mysql-8.0.16-winx64 # change according to your own address # set the directory where mysql database data is stored datadir=E:\ SQL\ MySQL\ mysql-8.0.16-winx64\ data # change according to your own address # maximum number of connections max_connections=200 # allow the number of connections to fail This is to prevent anyone from attempting to attack the database system max_connect_errors=10 # from this host. The character set used by the server defaults to UTF8character-set-server=utf8 # the default storage engine default-storage-engine=INNODB # that will be used when creating new tables 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

2.3 create a new data directory

3. Install mysql

During installation, cmd must be run as an administrator, otherwise an error will be reported during installation, which will lead to installation failure

3.1 initialize the database

Execute the command in the bin directory of the MySQL installation directory:

Mysqld-initialize-console

When the execution is complete, the initial default password of the root user is printed

Red is the password. Be sure to copy it to another place for use, or you will start all over again.

3.2 installation Services

Execute the command in the bin directory of the MySQL installation directory:

Mysqld-the service name after install [Service name] # can be left unwritten, and the default name is mysql.

After the installation is complete:

Start the MySQL service with the command net start mysql

Stop the MySQL service by commanding net stop mysql

If you need to uninstall the previous mysql, you can uninstall the MySQL service by using the command sc delete MySQL / mysqld-remove

4. Change the password

Execute the command in the bin directory of the MySQL installation directory:

Mysql-u root-p

At this time, you will be prompted to enter the password, remember the password of the installation in step 3.1 above, and enter it to log in successfully and enter the MySQL command mode.

If you stab in and report such an error:

Enter password: * ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

Win + r enter services.msc to start the mysql service

At this point, the installation is complete.

Execute the command in MySQL:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY' New password

Change the password, pay attention to the end of the command; be sure to have, this is the syntax of mysql

Operation without error prompts you "Query OK, 0 rows affected (0.01sec)"

Enter'\ t'to launch mysql, or you can enter help to select help

These are all the contents of the article "how to install and configure the mysql 8.0.16 package". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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