1. Download the MySQL 5.7.11 zip installation package This machine takes win7 64-bit system as an example. If it is a 32-bit system, please download the 32-bit installation package http://dev.mysql.com/downloads/mysql/ Select Windows (x86, 64-bit), ZIP Archive Download Package 2. Extracting the Install Archive D:\victor.min\software\mysql-5.7.11-winx64 #My decompression directory 3. Create an empty folder and name it data, or you can name it anything you want to store data # This machine is created in the D:\victor.min\software\mysql-5.7.11-winx64 directory, so you will see D:\victor.min\software\mysql-5.7.11-winx64\data at the end #This folder will be used later 4. Configure your own startup configuration file | Creating an Option File If you don't have any special requirements, just copy the D:\victor.min\software\mysql-5.7.11-winx64\my-default.ini file, rename it to my.ini, and modify a few parameters in it. The configuration file is as follows # For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.7/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 = ..... # datadir = ..... # port = ..... # server_id = ..... ######################### # basedir is the directory after the installation file is unzipped | basedir and datadir can use relative paths # basedir=./.. basedir=D:\\victor.min\\software\\mysql-5.7.11-winx64 # datadir is the directory used to store data# datadir=./../data datadir=D:\\victor.min\\software\\mysql-5.7.11-winx64\\data # port is the port number port=3306 # mar_connections is the maximum number of connections max_connections=20 character_set_server=utf8 # 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 explicit_defaults_for_timestamp=true sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 5. Initializing the Data Directory Of course, according to the steps given in the official MySQL documentation, there is another step, Selecting a MySQL Server Type, which is to choose whether to use mysqld or mysqld-debug | The command is as follows mysqld --defaults-file="D:\victor.min\software\mysql-5.7.11-winx64\my.ini" --initialize-insecure Note: 1. This command is very important. It will initialize the data directory. Please delete all files in the data directory before executing this command, otherwise it will fail. 2. You can choose to initialize with --initialize-insecure or --initialize. --initialize-insecure initializes the root password to empty. If you use --initialize to initialize, a random password will be generated. After successful execution, you will see mysql, performance_schema, and sys directories in the data directory, as well as some files 6. Install MySQL service mysqld -install 7. Start mysql service net start mysql At this point, the mysql service is started, and we can log in to mysql as root mysql -u root -p For convenience, it is best to configure mysql to the environment variable postscript: If any step fails, be sure to execute the mysql removal command and delete all files in the data directory. mysqld -remove Special reminder: 5.7 is different from 5.6. You need to initialize the data directory yourself, otherwise the startup will not succeed. Statements that may be used after mysql installation alter user 'root'@'localhost' identified by '123'; create database victor; create user 'victor'@'localhost' identified by 'victor@123'; flush privileges; create user 'victorremote'@'%' identified by 'victorremote@123'; flush privileges; grant all on victor.* to 'victor'@'localhost' identified by 'victor@123'; flush privileges; grant all on victor.* to 'victorremote'@'%' identified by 'victorremote@123'; flush privileges; ################################ mysql configuration parameter query http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html 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:
|
<<: Detailed steps to start the Django project with nginx+uwsgi
>>: How to use video.js in vue to play m3u8 format videos
1. What is it? MySQL is the most popular relation...
Phenomenon: Run an image, for example, ubuntu14.0...
Using fonts on the Web is both a fundamental skill...
01. Command Overview The tr command can replace, ...
difficulty Two mask creation of svg graphics Firs...
The effect is as follows: The code is as follows ...
Copy code The code is as follows: <!DOCTYPE ht...
GitHub address, you can star it if you like it Pl...
MySQL full-text index is a special index that gen...
Use JS to complete a simple calculator for your r...
Achieve results Implementation Code html <div ...
Syntax format: row_number() over(partition by gro...
Business scenario: querying tables in different d...
Preface Any application that can be written in Ja...
Part 3: ❤Three ways to overlook backend data rece...