MySql 5.7.28 Installation Considerations

Just recently used a 5.7, so I dropped documenting it, the difference between 5.7 and 5.6 is that 5.7 can not use a blank password to log

Download: https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.28-winx64.zip

Before you install must be installed if already installed, please ignore: Visual C ++ Redistributable Packages Standard Package for Visual Studio 2013

After downloading the installation file to a local, extract it, see the directory structure, in fact, no data folder, so the first step is to initialize the database: cd MySql cut to the bin directory, and then execute the following command.

mysqld --initialize

 

 

 Then we can install a database, but prior to installation, the first increase in a configuration section my.ini configuration file: skip-grant-tables = 1, skip the verification authority, why do you want to add this? Because MySql5.7 version, a blank password can not log on, you can only skip verification before you can log in to change the password.

skip-grant-tables=1

 

 

 Start the installation, enter the following command after the installation is complete, start the service: - defaults-file path specified configuration file

mysqld -install MySql --defaults-file="D:\mysql-5.7.28-winx64\my.ini"

 

 

 Avoid close Login

mysql -u root

 

 

 After a successful login, change the root user's password

use mysql;
update user set authentication_string = password('dwburning'), password_expired = 'N', password_last_changed = now() where user = 'root';

Modify remote connection permissions

update user set host = '%' where user='root';

 

 

 Exit mysql, the skip-grant-tables = 1 configuration commented, restart the mysql service, and then use the password to log in again, create a new user, authorization

create user 'test'@'%' identified by 'dwburning';
grant all privileges on *.* to 'test'@'%' identified by 'dwburning';
flush privileges;

Guess you like

Origin www.cnblogs.com/dwBurning/p/msyql5728.html