1. First, download the latest version of MySQL from the official website of MySQL. Click the link to open it. Select the corresponding package to download according to your system model. It is about 300 megabytes and the version number is 5.7.19. After downloading, decompress it, it is a standard mysql file, as shown in the figure 2. The second step is to configure the system environment variables, desktop → My Computer → right click "Properties" → Advanced System Settings → Environment Variables → System Variables → New You can name the variable whatever you like. I'm calling it MYSQL_HOME. The variable value is the directory where the mysql folder you just downloaded is located. We point to the bin directory in it, and then confirm the return all the way. 3. There is no default configuration file in our mysql file. We create a new .ini configuration file named my-default.ini with the following content: # For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the # *** default location during installation, and will be replaced if you # *** upgrade to a newer version of MySQL. [mysqld] # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128M # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. # log_bin # These are commonly set, remove the # and set as required. # basedir = D:\mysql-server # datadir = D:\mysql-server\data # port = ..... # server_id = ..... #Set the server character set to utf8 character_set_server=utf8 collation-server=utf8_general_ci #Set the installation directory of mysql basedir = D:\mysql-server #Set the mysql data file storage directory datadir = D:\mysql-server\data #Set the port bound to the mysql service port = 3306 #Set the maximum number of connections allowed by MySQL max_connections=15 # Remove leading # to set options mainly useful for reporting servers. # The server defaults are faster for transactions and fast SELECTs. # Adjust sizes as needed, experiment to find the optimal values. # join_buffer_size = 128M # sort_buffer_size = 2M # read_rnd_buffer_size = 2M [client] #Set the client character set default-character-set=utf8 [WinMySQLadmin] Server = D:\mysql-server\bin\mysqld.exe sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES Pay attention to the paths in there. Be sure to change them to the path where your mysql folder is located. Since the directory I put it in is D:\mysql-server, the above configuration path is this 4. Prepare to install mysql and install it through the command line tool First, start cmd as an administrator!!! Note!!!, you must start it as an administrator, otherwise it will report an error later, prompting that you do not have enough permissions The command is as follows: Then start the service, command: net start mysql At this time, an error message is reported, indicating that it cannot be started, 3534. We use the Here it is prompted that there is no \data file or path in the mysql folder. At this time, we create a new one We use the command to enter the path of the mysql folder and enter the following command: mysqld --initialize-insecure --user=mysql After executing the above command, MySQL will create a data folder and a default database. The login username is root and the password is empty. At this time, we restart mysql and find that it can start normally. At this point, we have successfully installed MySQL Summarize The above is the 2017 latest version of Windows MySQL installation tutorial introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: JavaScript implements checkbox selection function
>>: A Deep Understanding of Angle Brackets in Bash (For Beginners)
background A new server was added in the company,...
This article uses examples to describe the basic ...
In cells, light border colors can be defined indi...
Usage scenarios For existing servers A and B, if ...
Table of contents What is a container data volume...
Preface Using Docker and VS Code can optimize the...
Sometimes we build a file server through nginx, w...
Counting the size of each table in each database ...
Table of contents Prerequisites DNS domain name r...
1. Use ansible's playbook to automatically in...
Recently, I have been working on thesis proposals ...
When inserting a set of data into the MySQL datab...
Docker is becoming more and more mature and its f...
After installing the MySQL database using the rpm...
Meta tag function The META tag is a key tag in th...