A long time ago uninstall the database on their own computer, today re-installed, feel that the whole person is not good, or to record the steps for future reference.
1, download (can be downloaded on the official website):
http://dev.mysql.com/downloads/mysql/
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/83/90/wKioL1d2IhLBy4uFAADbc26LPpo781.png "title=" capture. PNG "alt=" wkiol1d2ihlby4ufaadbc26lppo781.png "/>zip format can be downloaded.
-As for the Community Edition and Enterprise Edition of the difference, as the name implies, is the enterprise version of the more professional, provide more services, can image monitoring and so on, if it is personal use, with the community version can be completely.
2, unzip to the position you want to place. (This article was put to D:\mysql\mysql-5.7.13-win32)
3, add a folder to store data in D:\mysql\mysql-5.7.13-win32, I named My-data
4, create a new My.ini configuration file in D:\mysql\mysql-5.7.13-win32, and write the following configuration in the file:
################### #配置文件开始 ################### # 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 . [client] default-character-set=utf8 [ mysqld] port=3306 basedir = "D:\mysql\mysql-5.7.13-win32" datadir = "D:\mysql\mysql-5.7.13-win32\my-data\" tmpdir = "D:\mysql\ Mysql-5.7.13-win32\my-data\ " socket = "D:\mysql\mysql-5.7.13-win32\my-data\mysql.sock" log-error= "D : \mysql\mysql-5.7.13-win32\my-data\mysql_error.log " #server_id = 2 #skip-locking max_connections=100 table _open_cache=256 query_cache_size=1m tmp_table_size=32m thread_cache_size=8 innodb_data_home_dir= "D:\mysql\ Mysql-5.7.13-win32\my-data\ " innodb_flush_log_at_trx_commit =1 innodb_ log_buffer_size=128m innodb_buffer_pool_size=128m innodb_log_file_size=10m innodb_thread_concurrency=16 innodb-autoextend-increment=1000 join_buffer_size = 128M sort_buffer_size = 32M Read_rnd_buffer_size = 32m max_allowed_packet = 32m explicit_defaults_for_timestamp= True sql-mode= "Strict_trans_tables,no_auto_create_user,no_engine_substitution" skip-grant-tables #sql_mode =no_engine_substitution,strict_trans_tables ##### ############## #配置文件结束 ###################
5, add the following variable to the Windows System environment variable path: (Note that if there are other paths in path, the path must be added in front of it;
D:\mysql\mysql-5.7.13-win32;
6. Register MySQL as a Windows system service:
Run as Administrator cmd.exe
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/83/92/wKiom1d2J17zebqRAAAUHdlQb-0292.png "title=" capture. PNG "alt=" Wkiom1d2j17zebqraaauhdlqb-0292.png "/>
Note: The Remove service command is: mysqld remove
7, after successful registration, initialize the Data directory:
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/83/93/wKiom1d2Ld7Qpr2LAAAKMn7jnuo608.png "title=" capture. PNG "alt=" Wkiom1d2ld7qpr2laaakmn7jnuo608.png "/>
This step is important and does not initialize, which may cause the service not to start properly.
8. Open System Services Management, (computer, right-click, select Administration, click Services and applications, select services)
You can see the MySQL service, you can change the automatic mode to manual (right-click on the property on the service, you can see the startup type, and then select Manual), so that the service will not start automatically, just use the database to trouble some to manually open the service.
Start MySQL command at the command line for: net start MySQL
Shutdown mysql command for: net stop MySQL
9. Change the root password: command line to execute the following command:
Mysql–uroot mysql>show databases; Mysql>use MySQL; mysql> Update Mysql.user Set Authentication_string=password (' 12345 ') where user= ' root ' and Host = ' localhost '; mysql> FLUSH privileges; Mysql> QUIT
I later went to configure the Visual Tools DB when the error was your password has expired. To log on you must the it using a client that supports expired passwords is the password expired and I don't know if the statement above is not executed correctly, the workaround is to enter at the command line:
Set Password=password ("123456");
Later, with 123456 to configure DB, it succeeded.
Note: instead of the password field in the user table in the new MySQL database, the encrypted user password is stored in the Authentication_string field
Regarding the authorization, I did not have the authorization to succeed, if need, may go to check the other literature, I may also add up later. :)
This article is from the "bilingling" blog, make sure to keep this source http://bilingling.blog.51cto.com/11578217/1794988
MySQL 5.7.13 winx32 installation steps