Windows install MySQL 5.7.12

Source: Internet
Author: User
Tags change settings

Look at the official website documents for a half-day, also do not know what has been, and finally search a bit, or Chinese understood

1 download Unzip section slightly ...

2 Adding environment variables

Add XX disk after path:/xx directory/mysql-5.7.12-winx64/bin

3 mysql-5.7.12-winx64 directory under the new My.ini configuration file (you can also directly copy the My-default file and then rename), open the My.ini file, which writes the following content (specific path, whichever is your own)

# for advice The change settings see# http://dev.mysql.com/doc/refman/5.7/en/ server-configuration-defaults.html# * * * does not EDIT the this FILE.  It's a template which'll be copied to the# * * * default location during install, and would be replaced if you# * * * Upgrade To a newer version of MySQL. [Client]default-character-set=utf8[mysqld]port=3306basedir  = "d:/software/web/mysql/mysql-5.7.12-winx64/" DataDir  = "d:/software/web/mysql/mysql-5.7.12-winx64/data/" tmpdir   = "d:/software/web/mysql/mysql-5.7.12-winx64/data/" Socket   = "d:/software/web/mysql/mysql-5.7.12-winx64/data/mysql.sock" log-error= "d:/software/web/mysql/ Mysql-5.7.12-winx64/data/mysql_error.log "  #server_id = 2#skip-locking max_connections=100table_open_ cache=256query_cache_size=1m tmp_table_size=32mthread_cache_size=8 innodb_data_home_dir= "d:/software/web/ mysql/mysql-5.7.12-winx64/data/"Innodb_flush_log_at_trx_commit =1innodb_log_buffer_size=128minnodb_buffer_pool_ Size=128minnodb_log_file_size=10minnodb_thread_concUrrency=16innodb-autoextend-increment=1000join_buffer_size = 128msort_buffer_size = 32Mread_rnd_buffer_size = 32Mmax _allowed_packet = 32mexplicit_defaults_for_timestamp=truesql-mode= "Strict_trans_tables,no_auto_create_user,no_ Engine_substitution "#sql_mode =no_engine_substitution,strict_trans_tables

4 cmd Enter "command Prompt" as Administrator

CD into the Mysql-5.7.12-winx64\bin directory

Input: Mysqld--initialize will automatically add the data directory

Input: mysqld install MySQL--defaults-file= "d:/xx directory/mysql-5.7.12-winx64/my.ini" specific path according to your own write (if prompted already have the input mysqld remove Remove and then execute the above command)

Input: net start MySQL is ready to start.

MySQL default password is empty Oh, you can set your own MySQL password

Add the command to change the password:

After entering Mydql>

Input Mysql>use MySQL

mysql> Update user Set Authentication_string=password (' 123456 ') where user= ' root ';


mysql> flush Privileges;
Mysql> quit

Windows install MySQL 5.7.12

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.