New MySQL (mysql-5.7.12-winx64) installation

Source: Internet
Author: User
Tags change settings

Before installing a PHP integrated running environment of MySQL, not very accustomed to, or want to get a native environment to learn. As a result, MySQL is uninstalled in the PHP integrated environment.

Computer environment: Win7 x64.

1, mysql-5.7.12-winx64 download.

: http://dev.mysql.com/downloads/mysql/

2. Unzip to D:/java_study

3, the new Data folder under the d:/java_study/mysql-5.7.12-winx64/;

Under D:/JAVA_STUDY/MYSQL-5.7.12-WINX64/, create a new My.ini configuration file with the following content:

1 # for advice the change settings2# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html3# * * * Don't EDIT this FILE. It's a template which 'll be copied to the4# ***defaultLocation during install, and would be replacedif You5# ***upgrade to a newer version of MySQL.6 [Client]7 default-character-Set=UTF88 9 [Mysqld]Tenport=3306 OneBasedir ="d:/java_study/mysql-5.7.12-winx64/" ADataDir ="d:/java_study/mysql-5.7.12-winx64/data/" -Tmpdir ="d:/java_study/mysql-5.7.12-winx64/data/" -Socket ="D:/java_study/mysql-5.7.12-winx64/data/mysql.sock" theLog-error="D:/java_study/mysql-5.7.12-winx64/data/mysql_error.log" -   -#server_id =2 -#skip-Locking +   -max_connections= - +Table_open_cache= the AQuery_cache_size=1M at   -Tmp_table_size=32M -Thread_cache_size=8 -   -Innodb_data_home_dir="d:/java_study/mysql-5.7.12-winx64/data/" -Innodb_flush_log_at_trx_commit =1 inInnodb_log_buffer_size=128M -Innodb_buffer_pool_size=128M toInnodb_log_file_size=10M +innodb_thread_concurrency= - -Innodb-autoextend-increment= + theJoin_buffer_size =128M *Sort_buffer_size =32M $Read_rnd_buffer_size =32MPanax NotoginsengMax_allowed_packet =32M -explicit_defaults_for_timestamp=true theSql-mode="strict_trans_tables,no_auto_create_user,no_engine_substitution" +#sql_mode =no_engine_substitution,strict_trans_tables

4. Add Environment variables:

Append to Path variable: d:/java_study/mysql-5.7.12-winx64/data/bin; (note plus semicolon)

5. Register MySQL for Windows service and start:

Note: You need to run the command as an administrator.

1 first step: Go to the Bin folder under the root directory of the installation directory2 CD D:3 D:4CD d:\Java_Study\mysql-5.7. A-Winx64\bin5 Step Two: Execute the Initialize service command. 6Mysqld--initialize-insecure7 //------Note that if insecure is missing from the side, a default random password will be generated after installation to be present in the D:\Java_Study\mysql-5.7.12-winx64\data\mysql_error.log file. 8 Step Three: Execute the Add service command. 9Mysqld Install MySQL--defaults-file="D:/java_study/mysql-5.7.12-winx64/my.ini"Ten Note: Remove the service as mysqld remove. One Fourth Step: Start the service A net start MySQL -Note: net stop MySQL stops the MySQL service.

6. Modify the MySQL root password.

After initialization in step 5, the MySQL root default password is empty after installation.

So, we need to change the root password: change the root password to 123456

Command line execution: Mysql–uroot
Mysql>show databases;
Mysql>use MySQL;
mysql> UPDATE user SET Authentication_string=password (' 123456 ') WHERE user= ' root ';
mysql> FLUSH privileges;
Mysql> QUIT

Note: This side is not update user set Password=password (' 123456 ') where user= ' root ', because the password field is already not included in the latest MySQL user table. Instead, the Authentication_string field is used instead.

At this point, the installation is over, and you can also assign permission assignments, and this article is just about here.

New MySQL (mysql-5.7.12-winx64) installation

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.