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

Mysql5.7.17 package installation and configuration method graphic and text tutorial

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

Share

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

There are few and no detailed tutorials on the installation of MySQL 5.7.17 on the network, so this article is summarized in the hope that it can help you: (compared with Oracle installation, MySQL is still much simpler.)

1. Download URL: https://dev.mysql.com/downloads/( needs to log in to the Oracle account, if you don't, just register one, which is very fast)

two。 There is a charge for the enterprise version, and individuals can use the community version.

3. As of this post, the latest stable version is 5.7.17. This version only has 32-bit online interface installer, and 64-bit version only has online installation (install MSI) prior to 5.6. if you haven't configured the compressed version in the end, choose the previous version:

4.

The last two are testing tools, which can be ignored. What I download here is a 64-bit package.

5.

After the download is completed, decompress it as follows (zip is installation-free, and can be used after successful configuration)

6. Copy the file my-default.ini, change it to my.ini Note: my.ini is still placed in the bin directory (I follow the method of other netizens in the root directory, the initialization data file will not be found folder) (some tutorials say that you need to create an empty data folder here, but you don't have to. According to the official document, one of the following steps will automatically create a data folder.) the following image is placed in the wrong location and should be placed in the "bin" directory.

7. Then there is a series of configurations:

Note: everyone had better take a screenshot of their own parameter settings so that they can be checked in case of mistakes in the future.

Configure environment variables:

(1) add environment variables:

(2) Edit path and add the following code:

Copy the file my-default.ini and rename my.ini, and then add the following code: (you can translate the contents of my-default.ini to enhance your understanding so that you can set parameters in it.) log_bin is related to data backup, and I didn't set it.

Innodb_buffer_pool_size: it is recommended to set it to 50% of the operating system memory. If the setting is too large, MySQL may take up system swap space, causing the system to slow down, thus reducing query efficiency

Basedir: this is the environment variable you set earlier.

Server_id: with regard to master-slave replication, it should be set casually, but it must be unique.

Datadir:

Subsequent initialization and other data will be saved in this file, and subsequent operations of the file will be automatically established.

Port: the port number to connect to the database is 3306. The default for online installation of MySQL is 3306.

The last three parameters are also roughly the size of each buffer, which I don't know much about, but multiply each by 4 on the default value (the computer with good performance can be higher).

Note: when setting the parameters in the file, delete the # character before the set parameters

Note: I have only set these parameters for the time being, which should be sufficient. For more specific parameters, you can refer to this article: how to configure My.ini files for MySQL5.6.17 database installation.

8. Initialize the database and configure related information

Open a command prompt to run as an administrator, cd / d to D:\ MySQL\ mysql-5.7.17-winx64\ bin (note that you run as an administrator and be sure to enter the bin directory)

After opening the mysqld install MySQL to run the command, MySQL is installed successfully.

Mysqld--initialize-insecure automatically generates root users without passwords, and mysqld--initialize automatically generates root users with random passwords (note, two -), which will be set later. Root (named after linux) is a MySQL user with super administrative privileges, which should be similar to Oracle's sys.

Note: after this operation generates a data folder successfully, you will find that the system has generated a data folder, as shown in the figure: (if there is an error in this process, please refer to the error / warning log)

Net start mysql starts the MySQL service

Set the password (it's best to take a note so as not to forget) and execute the following statement:

Net stop mysql enter

Go to the mysql\ bin\ directory and execute mysqld-- skip-grant-tables

Start another cmd and execute the following statement:

Mysqluse mysql

UPDATE user SET authentication_string = PASSWORD ('new password') WHERE user = 'root'; FLUSH PRIVILEGES;EXIT

Note: 5.7. the password field has been cancelled, be sure to write authentication_string

Task Manager ends mysqld.exe (Note: it's a process, not a service)

Log in to MySQL:

Administrator authority: mysql-u root-p and then enter the password (you can verify that the empty password can log in)

Other ways: check it yourself.

The inspection is done.

It's over.

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