There are few and inadequate installation tutorials for MySQL 5.7.17 on the Internet, so I have summarized this article, hoping to help everyone: (Compared to Oracle installation, MySQL is much simpler) 1. Download URL: https://dev.mysql.com/downloads/ (You need to log in to an Oracle account, if you don’t have one, just register one, it’s pretty fast) 2. The enterprise version is charged, and the community version is sufficient for personal use 3. As of this post, the latest stable version is 5.7.17. This version only has an online interface installer for 32-bit, and only versions before 5.6 have online installation (install MSI) for 64-bit. If you don't have the compressed version configured by the end, choose the previous version:
The last two are testing tools, you can ignore them. Here I downloaded the 64-bit compressed package.
After downloading, unzip it. The unzipped file is as follows (zip is free to install and can be used after successful configuration) 6. Copy the file my-default.ini and modify it to my.ini Note: my.ini is still placed in the bin directory (when I followed the method of other netizens and placed it in the root directory, the initialization data file would report that the folder could not be found) (Some tutorials say that you need to create a new empty data folder here, but it is not necessary . The official document explains that there is a step in the subsequent steps that will automatically create a data folder) The placement in the figure below is wrong, it should be placed in the "bin" directory 7. Next is a series of configurations: Note: It is best to take a screenshot of your own parameter settings so that you can check if there is an error later. Configure environment variables: (1) Add environment variables: (2) Edit the path and add the following code: Copy the file my-default.ini and rename it my.ini, then add the following code: (You can translate the content in my-default.ini to enhance your understanding so that you can set the parameters) log_bin is related to data backup, I did not set it innodb_buffer_pool_size: I personally recommend setting it to 50% of the operating system memory. If the value is set too large, MySQL may occupy system swap space, causing the system to slow down and thus reducing query efficiency. basedir: the environment variable set previously server_id: Regarding master-slave replication, it should be set arbitrarily, but it must be unique. datadir: Subsequent initialization and other data will be saved in this file, and subsequent operations of this file will automatically create port: The port number for connecting to the database. 3306 is sufficient. The default value for MySQL online installation is 3306. The last three parameters are roughly the sizes of the buffers. I don't know much about them either, but I just multiplied the default values by 4 (they can be higher if the computer has good performance) Note: When setting parameters in the file, delete the # sign in front of the parameter. Note: I have only set these parameters for now, which should be enough. For more specific parameters, you can refer to this article: How to configure the My.ini file when installing the MySQL 5.6.17 database 8. Initialize the database and configure relevant information Open the command prompt and run it as an administrator, cd /d to D:\MySQL\mysql-5.7.17-winx64\bin (note that you must run it as an administrator and enter the bin directory) Open mysqld install MySQL and run the command. MySQL is installed successfully. mysqld --initialize-insecure automatically generates a root user without a password. mysqld --initialize automatically generates a root user with a random password (note, there are two -s). The password will be set later. root (named after Linux) is the user with super management privileges in MySQL, which should be similar to Oracle's sys Note: After the operation successfully generates the data folder, you will find that the system has generated a data folder. Click it as shown in the figure: (If there is an error in the process, please refer to the error/warning log) net start mysql starts the MySQL service Set a password (it’s best to make a note so you don’t forget it), and execute the following statement: net stop mysql press enter Go to the mysql\bin\ directory and execute mysqld --skip-grant-tables Start another cmd and execute the following statements: mysql use mysql UPDATE user SET authentication_string = PASSWORD('new password') WHERE user = 'root'; FLUSH PRIVILEGES;EXIT; Note: The password field has been removed in 5.7, so be sure to write authentication_string End mysqld.exe in Task Manager (note: it is a process, not a service) Log in to MySQL: Administrator privileges: mysql -u root -p and then enter the password (you can verify whether an empty password can log in) Other methods: Check it yourself Inspection, done! end. The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: jQuery plugin to implement dashboard
>>: Detailed explanation of setting up DNS server in Linux
Today we will introduce several ways to use CSS t...
Implementation ideas: First of all, the alarm inf...
Mysql 8.0 installation problems and password rese...
I believe everyone knows HTML and CSS, knows the ...
How to use iframe: Copy code The code is as follo...
This article example shares the specific code of ...
This project shares the specific code of Vue+Rout...
Table of contents Purpose of Teleport How Telepor...
This story starts with an unexpected discovery tod...
Moore's Law no longer applies Starting with F...
In the previous article, we introduced how to use...
When making some pages, in order to make the page...
First create a specific project directory for you...
Table of contents Preface Rolling principle accom...
Here is a case of modal box dragging. The functio...