Mysql 5.7.16 winx64 installation and configuration method graphic tutorial, 5.7.16winx64
I have summarized the notes for installing mysql and shared them with you.
Version:MySQL-5.7.16-winx64
Platform:Windows 7x64
1. Go to the mysql home directory (it is recommended to move it to the root directory of drive C or drive D and change it to mysql)
2. Add the path environment variable (for example, D: \ JAVA \ mysql) to the environment variable.
3, mysql home directory under the my-default.ini file renamed my. ini, the simplest configuration 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 install, 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:\JAVA\mysql datadir = D:\JAVA\mysql\data port = 3306 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 sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
As shown in:
It can be seen that mysql does not have a data directory. Next we need to initialize the data directory.
Enter the bin directory under cmd
4. Run: mysqld -- initialize
5. install mysql mysqld install mysql -- defaults-file = "D: \ JAVA \ mysql \ my. ini"
6. start mysql net start mysql
Postscript:
If-initial-insecure is added during initialization, the root @ localhost account with an empty password will be created; otherwise, the root @ localhost account with a password will be created.
The password is saved in the *. err file in the data folder.
: 2016-11-25T04: 05: 29.713660Z 1 [Note] A temporary password is generated for root @ localhost:/lSEqHkou0x %
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.