Version: Mysql-5.7.18-win32
Steps:
1 Preparing the My.ini file to be placed in the bin sibling directory
My.ini files can be set bsedir/datadir/port and so on
2 Initializing the database (version 5.7 requires the database to be initialized before the data folder is generated)
Go to Bin directory, execute cmd
The default configuration file (My.ini) is the My.ini file that is sibling to the bin directory, or you can specify the configuration file yourself
3 start the MySQL server (a one-time service that starts with CMD, CMD shuts down, and the server shuts down, not the MySQL service that initiates the persistence)
Go to the bin directory and execute
The end is similar to the feeling that can never be done
At this point, you open the MySQL database configured according to your My.ini file (for example: Your port is set to 3355)
4 log in to MySQL server
Log in to the MySQL database you just opened according to your My.ini file
-P port number-p password
The password for initializing the database is generated randomly, under your Data folder
5 Change the initial password (must), set up the user
Change Password:
To create a user:
mysql> ALTER USER ' root ' @' localhost ' identified by 'new_password ';
Format: Grant permissions on the database tutorial name. table name to user @ Login host identified by "User password";
After the @ is the client IP address (or hostname) that accesses MySQL is represented by any client, if you fill out localhost as
Local access (the MySQL database cannot be accessed remotely by this user).
Mysql---deployment, creating users