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

Detailed tutorial on installation of mysql 8.0.11 compressed version under win10

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

Share

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

Recently, after reinstalling the computer, I downloaded the decompressed version of mysql8.0.11 in line with the obsessive-compulsive disorder principle of only the latest version.

However, there are a variety of installation tutorials found on the Internet, none of which can be installed successfully. I am really drunk. Here I write down my own successful installation methods to share with you.

I. configuration of environmental variables

First download the latest mysql8.0.11 database on the official website, decompress it to the letter you need to place in Chinese, and then create a new MYSQL_HOME.

Parameter is the bin file path of the unzipped mysql installation file, such as mine:

Variable name: MYSQL_HOME

Variable value: e:\ tools\ database\ mysql\ mysql8.0.11\ mysql-8.0.11-winx64\ bin

Then add% MYSQL_HOME%; at the beginning of the Path variable and make sure to save it.

Second, configure my.ini files

[mysqld] # set port 3306 port=3306# set the installation directory of mysql:\\ tools\\ database\\ mysql\\ mysql8.0.11\\ mysql-8.0.11-winx64# set the directory where the data of the mysql database is stored datadir=E:\\ tools\\ database\\ mysql\\ mysql8.0.11\\ data# the maximum number of connections max_connections=200# allows the number of failed connections. This is to prevent attempts from this host to attack the character set used by the max_connect_errors=10# server of the database system, which defaults to utf8mb4character-set-server=utf8mb4# using the-skip-external-locking MySQL option to avoid external locking. This option is enabled by default external-locking = FALSE# the default storage engine that will be used when creating new tables default-storage-engine=INNODB # uses the "mysql_native_password" plug-in authentication default_authentication_plugin=mysql_native_ password [mysqld _ safe] log-error=E:\\ tools\\ database\\ mysql\\ mysql8.0.11\\ mysql_oldboy.errpid-file=E:\\ tools\\ database\\ mysql\\ mysql8.0.11\\ mysqld.pid# defines the sql syntax that mysql should support Data verification sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_ tables [MySQL] # set mysql client default character set default-character-set=utf8mb4 [client] # set mysql client default port port=3306default-character-set=utf8mb4 when connecting to the server

Create a new my.txt file in the mysql directory, which can be the same as mine, or you can go to the official documentation to configure it yourself.

What needs to be explained in the configuration here is:

Basedir: the installation directory for mysql

Datadir: please modify the location of the database data according to your own.

Log-error: you also need to set up your own file directory here.

Pid-file: also set up according to your own file directory

It should also be noted that the file path is no longer a single "\" like the 5.x version, but "\"

Save after configuration, and modify the suffix to my.ini

Another note: although you have written data on the path, do not create the file yourself, otherwise mysql will report that data already exists and cannot be initialized

Initialize the database

At this point, open cmd and start it as an administrator

1. Type the command drive letter, such as my e:

2. Cd E:\ tools\ database\ mysql\ mysql8.0.11\ mysql-8.0.11-winx64\ bin

3. Enter the mysqld-- initialize-- user=mysql-- console command to initialize the database. An initial password will appear later. Be sure to copy and paste it into a document.

4. Later, you will be prompted for successful initialization, and then execute mysqld-- install will prompt for successful installation.

4. Change the initial password of root account

Run cmd input:

Net start mysql

After mysql starts, enter:

Mysql-u root-p

You will be prompted to enter your password. The initial password you saved will be used here. After entering it, you will be prompted to welcome it. Let's modify the initial password.

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

Remember that the statement with a'; 'sign will indicate success, and then enter

FLUSH PRIVILEGES

To refresh the database user, now that the installation is complete, you can try to create a new table and then query some data, which is really faster than 5.x

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