Reference article Links:
Http://jingyan.baidu.com/article/afd8f4de9006d934e286e9fd.html
Http://www.cnblogs.com/wenthink/p/MySQLInstall.html
Http://www.cnblogs.com/weiwang/p/5404952.html
1. Configuration Documentation:
################### #配置文件开始 ################### # for advice in how to 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:\mysql-5.7.14-winx64"DataDir= "d:\mysql-5.7.14-winx64/data/"Tmpdir= "d:\mysql-5.7.14-winx64/data/"Socket= "D:\mysql-5.7.14-winx64/data/mysql.sock"Log-error= "D:\mysql-5.7.14-winx64/data/mysql_error.log"#server_id= 2#skip-locking max_connections=100Table_open_cache=256query_cache_size=1M tmp_table_size=32M thread_cache_size=8Innodb_data_home_dir= "d:\mysql-5.7.14-winx64/data/"Innodb_flush_log_at_trx_commit=1innodb_log_buffer_size=128M innodb_buffer_pool_size=128M innodb_log_file_size=10M innodb_thread_concurrency=16innodb-autoextend-increment=1000join_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################### #配置文件结束 ###################
View Code
2. Add Environment variables
3. Start the service
net start MySQL
The MySQL service is starting.
The MySQL service could not be started.
Problem solving
Delete the contents of the Data folder
Then enter the following command:
4. Log in to Access denied for user ' root ' @ ' localhost ' (using password:no) Problem resolution
1). Locate My-default.ini in the root directory where MySQL is located, and copy all of the contents
Create a TXT document, copy the contents, and then save the name to My.ini, note the need to change the file type to ini, the method to view the file type, and then change the txt suffix to ini, if you do not understand the Internet to find.
2). My.ini configuration file, open the configuration file, find [mysqld] a line, add skip-grant-tables below to save the file, restart the MySQL dynamic service.
Through the cmd into the bin directory under MySQL, input mysql-u root-p can not login with the password, password: When the direct return can enter, will not appear error 1045 (28000), but many operations will be limited, Because we can't grant (without permission).
Go to MySQL database:
mysql> Use mysql;database changed
Enter Update Mysql.user set Authentication_string=password (' root ') where user= ' root ';
Enter Update Mysql.user set Authentication_string=password (' root ') where user= ' root ', where password (") is your future password.
The reason for the repetition is that it is different from the input method before 5.7.
The reason is: the new installation of MySQL5.7, password error when logging on, the installation did not change the password, and then through the password-free way to change the password, enter the update mysql.user set Password=password (' root ') where User= ' root ' Prompts for error 1054 (42S22): Unknown column ' Password ' in ' Field List ', which is already in the MySQL database has no password this field, The password field is changed to authentication_string, so if you follow the previous update mysql.user set Password=password (' root ') where user], you will get an error.
Edit My.ini File Delete Skip-grant-tables this line, and then restart MySQL, or MySQL will still be able to password-free login.
mysql5.7.14 Installation and Configuration