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 use mysql5.7.21

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

Share

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

How to install and use mysql5.7.21? Many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can gain something.

1. MySQL installation

1. Download the community version on the official website.

2. Extract to disk C: C:\ mysql-5.7.21-winx64

3. Run the command line as an administrator and enter the directory C:\ mysql-5.7.21-winx64\ bin

4. Registration service: C:\ mysql-5.7.21-winx64\ bin > mysqld install mysql5.7.21

5. Initialize the database: C:\ mysql-5.7.21-winx64\ bin > mysqld-- initialize

6. Start the database: C:\ mysql-5.7.21-winx64\ bin > net start mysql5.7.21

7. Log in to the database: C:\ mysql-5.7.21-winx64\ bin > mysql- u root-p

Note that the login password is found in the mysql installation directory * .err file, for example, the red character: 2018-01-17T09:26:11.260249Z 1 [Note] A temporary password is generated for root@localhost: _ = (HMagenpX.7yZ)

8. Modify the password of root user: C:\ mysql-5.7.21-winx64\ bin > mysqladmin-uroot-ppassword = (Hmaiden pX.7yZ password 1234)

II. MySQL configuration

1. Create C:\ mysql-5.7.21-winx64\ my.ini. The contents of the file are as follows:

[mysqld] # set port 3306 port = 330 setting mysql installation directory basedir=C:\ mysql-5.7.21-winx64# set mysql database data storage directory datadir=C:\ mysql-5.7.21-winx64\ data # allow maximum number of connections the character set used by the max_connections=200# server defaults to 8-bit encoded latin1 character set character-set-server=utf8# default storage to be used when creating a new table Engine default-storage-engine=INNODB# is set to strict mode sql_mode=NO_ENGINE_SUBSTITUTION STRICT_TRANS_ tables [MySQL] # is it helpful for you to set the default character set of mysql client default-character-set=utf8 after reading the above? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

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