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

Mysql 8.0.17 decompressed version installation and configuration method graphic and text tutorial

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

Share

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

Record the problems encountered in your installation process, and I hope it will be useful to you.

1. Download (it is officially recommended to download the installation version, but the unzipped version is more convenient), download address:

2. To decompress, we need to add one more step:

(1) create a file named my.ini, and add: the data folder was built before, but the subsequent installation reported an error, which is a warning.

3. Modify the my.ini file:

[mysql] # set mysql client default character set default-character-set=utf8 [mysqld] # set port 3306 port = 330mm set mysql installation directory basedir = D:\\ Program Files\\ mysql\\ # set mysql database data storage directory datadir = D:\\ Program Files\\ mysql\\ data# the character set used by the max_connections=20# server defaults to 8-bit encoded latin1 Default storage engine default-storage-engine=INNODB# creation mode sql_mode = NO_ENGINE_SUBSTITUTION that the character set character-set-server=utf8# will use when creating a new table STRICT_TRANS_TABLES

Special attention should be paid to:

(1) D:\\ Program Files\\ mysql\\ data this directory must be "\", do not make it "\", or you will report an error, or you can use "/".

(2) Mysq installation directory and data storage directory must be modified for your own directory, unless you set the same directory as above.

4. Configure the environment variables of mysql:

Click Path to add:

5. Run cmd as an administrator and do the following:

(1) change to the bin directory of mysql

(2) execute the mysqld-- initialize command, and a new directory data will be generated. If you look at the .err file, you can see the random password generated by the root user.

(3) execute the mysqld-- install command to install the mysqld service

(4) execute net start mysql command to start mysql service

(5) execute the command mysql-u root-p, connect to the mysql database, and enter the password randomly generated above

(6) perform the following sql to reset the root password:

Mysql > alter user 'root'@'localhost' identified with mysql_native_password by' New password'

Tips:

Mysqld-initialize-insecure automatically generates root users without passwords; mysqld-initialize automatically generates root users with random passwords; mysqld-remove removes its own mysqld service; net stop mysql command to stop mysql service if an error is reported, empty the data folder, it is best to delete the data file and re-execute the remove--initialize--install--start (these are not commands) process

Wonderful topic sharing:

Installation tutorials for different versions of mysql

Installation tutorials for each version of mysql5.7

Installation tutorials for each version of mysql5.6

Installation tutorials for each version of mysql8.0

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