mysql 5.7.27 win64 mounting step

1, the installation package to extract the specified directory.

2, set the environment variable, bin path in the path entry to add mysql. For example: C: \ Program Files \ mysql-advanced-5.7.27-winx64 \ bin;

3. Create mysql my.ini file in the directory, complete the following:

[mysql] 
# mysql client set the default character set 
default Character-SET-UTF8 = 

[mysqld] 
# 3306 port disposed 
Port = 3306 
# Set mysql installation directory 
basedir = C: \ Program Files \ mysql-advanced-5.7.27- Winx64 
# mysql database setting data storage directory 
DATADIR = C: \ Program Files \ mysql-advanced-5.7.27-Winx64 \ data 
# maximum number of connections 
max_connections = 1000 
# character set used by the server defaults to the 8-bit encoding latin1 character set 
character-set-server = utf8 
default storage engine when creating a new table # will use 
default-storage-engine = INNODB

4, initialize the database.

With administrator privileges to run cmd , execute: mysqld --initialize-in the insecure --user = MySQL.

If you encounter an error, the data after the deleted folder can be re-executed.

5, with administrator privileges to run cmd , via cmd into the command mysql 's bin folder, enter the command: " mysqld -install ", appear " Service successfully Installed " represents a successful installation.

6, start MySql. Enter the " NET Start MySQL " start MySQL.

7, change the root password. Enter the command: mysqladmin -u root -p password mypasswd (own password to be set)

8, log in mysql. Enter " MySQL -u root -p " Login MySQL.

9, create new users and assign permissions.

CREATE USER 'username' @ '%' IDENTIFIED BY 'password';
. GRANT ALL ON * * TO 'username' @ '%';

 

Guess you like

Origin www.cnblogs.com/ljl-blog/p/11541799.html