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

Win10 installs unzipped version of mysql5 or mysql58 (illustration)

2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

MySQL5.7 version unzipped version download address: https://dev.mysql.com/downloads/mysql/5.7.html#downloads

1. download

1.1 choose the version you need:

1.2 next step

two。 Extract to a custom folder

3. Configure environment variables (mine is a windows10 system, but if you don't do this, the later steps will change)

3.1 Open system environment variables

3.2 add system variabl

Variable name: MYSQL_HOME

Variable value: d:\ Program Files\ mysql-5.7.23-winx64 (fill in the directory where you unzipped the file)

Edit Path variabl

Fill in:% MYSQL_HOME%\ bin

3.4 one way [OK], just turn off the system variable

4. Add my.ini profile

Since the my.ini file is no longer included in version 5.7, we need to create it ourselves and create the my.ini file in the root directory of the extracted file

Fill in the following:

[mysqld] # set port 3307 port = 330setting mysql installation directory basedir=D:/Program Files/mysql-5.7.25-winx64# setting mysql database data storage directory datadir=D:/Program Files/mysql-5.7.25-winx64/data# maximum number of connections allowed (it is recommended to set a larger number of connections Prevent error messages with too many connections) character set used by max_connections=2000# server default utf8character-set-server=utf8# default storage engine used when creating new tables default-storage-engine=INNODB# sets sql syntax mode sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_ tables [MySQL] # sets mysql client default character set default-character-set=utf8

5. Open the CMD window in administrator mode and go to the MySQL root directory

Install the MySQL service (if you do not do step 3, you need to go to the bin directory to do the following)

/ / install MySQL service. The service name may not be written. Default is "MySQL" mysqld-install service name / / Uninstall MySQL service name, but default is "MySQL" mysqld-remove service name.

View the service that has just been installed

6. Initialize the MySQL database

Execute the initialization command (choose one of the two in the following way). If you need to reinitialize the database, just delete the data directory and execute the initialization command again

/ / method 1: initialize to empty password mysqld-- initialize-insecure-- user=mysql

After successful execution, generate the data folder under the root directory of MySQL

/ / method 2: initialize to random password mysqld-initialize-user=mysql-console

7. Start MySQL service (service name ignores case) / / start MySQL service net start mysql57_01// turn off MySQL service net stop mysql57_01

8. Set the root user's new password

Connect to the mysql database (enter the password if it is empty and enter the random password)

/ / Connect to the database, where port 3307 is specified (default 3306 if not written, but there is already a mysql, so 3306 has been occupied) mysql-u root-p-P3307

8.2 change password

Set password = password ('abc_123'); # mysql8.0.18 uses this command set password =' abc_123'

9. Test connection

If you install MySql8.0.18, you may report errors using Navicat connection. You can use the new version of Navicat connection because MySql8 has replaced the new encryption plug-in, and another is to modify the MySql encryption plug-in to the old encryption plug-in. The solution is as follows:

Mysql > use mysql;mysql > ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY' abc_123';mysql > flush privileges

Just restart the service.

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

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report