1. download the mysql-577-rc-winx64zip from the mysql website; 2. unzip the mysql-577-rc-winx64zip to the appropriate installation directory (for example, under D: dev_tools); 3: the my-defaulini file under the dev_toolsmysql-577 file is named my 1.download mysql-5.7.7-rc-winx64.zip from mysqlwebsite;
2.decompress mysql-5.7.7-rc-winx64.zip to the corresponding installation directory (for example, D: \ dev_tools );
3. name the mysql-5.7.7 file under the D: \ dev_tools \ my-default.ini file my. ini;
4. modify the my. ini file (you can do this without modifying it ):
# 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 # *** Default location during install, and will be replaced if you # *** Upgrade to a newer version of MySQL. [Client] Default-character-set = utf8 [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 servers, else 10%. # Innodb_buffer_pool_size = 128 M # 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: \ dev_tools \ mysql-5.7.7" Datadir = "D: \ dev_tools \ mysql-5.7.7 \ data" Tmpdir = "D: \ dev_tools \ mysql-5.7.7 \ data" Socket = "D: \ dev_tools \ mysql-5.7.7 \ data \ mysql. sock" Port = 3306 Log-error = "D: \ dev_tools \ mysql-5.7.7 \ data \ mysql_error.log" # Server_id = ..... Max_connections = 100 Table_open_cache = 256 Query_cache_size = 1 M Tmp_table_size = 32 M Thread_cache_size = 8 Innodb_data_home_dir = "D: \ dev_tools \ mysql-5.7.7 \ data \" Innodb_flush_log_at_trx_commit = 1 Innodb_log_buffer_size = 128 M Innodb_buffer_pool_size = 128 M Innodb_log_file_size = 10 M Innodb_thread_concurrency = 16 Innodb-autoextend-increment = 1000 # 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 = 128 M Sort_buffer_size = 32 M Read_rnd_buffer_size = 32 M Max_allowed_packet = 32 M Explicit_defaults_for_timestamp = true SQL _mode = "STRICT_TRANS_TABLES, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION" |
5. configure environment variables to add "D: \ dev_tools \ mysql-5.7.7 \ bin" to the path (note that variables are separated );
6. add service: Open the cmd command mode, switch to the directory "D: \ dev_tools \ mysql-5.7.7 \ bin", execute mysqld-install mysql57 (configurable, the default is mysql );
7. start the service: In cmd command mode, enter net start mysql57 to start the database.
8. modify the root password:
Command line execution: mysql-u root-p Mysql> show databases; Mysql> use mysql; Mysql> SET password = PASSWORD ('20140901 '); Mysql> flush privileges; Mysql> QUIT |