Summary of mysql 5.7 database installation steps, mysql5.7
1.mysql-5.7.19-winx64.zip (this is an installation-free version, around 318 MB, there is an installation version, around 380 MB mysql-installer-community-5.7.19.0.msi) unzip this installation package to the specified Disk
2. Change the extracted file name to mysql.
3. check whether there is data in the mysql folder. If not, create a new folder.
4. Open the mysql folder and create a new my. ini (note this format) file to overwrite the my-default.ini (it doesn't matter if you don't see this file)
5. This is the case in my. ini.
[Mysql]
# Set the default Character Set of the mysql client
Default-character-set = utf8
[Mysqld]
# Set port 3306
Port = 3306
# Set the installation directory of mysql
Basedir = D: \ mysql // change to your own installation directory
# Set the directory for storing mysql database data
Datadir = D: \ mysql \ data // modify it to your own installation directory
# Maximum number of connections allowed
Max_connections = 1000
# The default character set used by the server is the 8-bit latin1 character set.
Character-set-server = utf8
# The default storage engine used to create a new table
Default-storage-engine = INNODB
6. Open cmd and find the bin directory, for example, D: \> cd mysql \ bin. Enter the command: D: \ mysql \ bin> mysqld-install.
Get this feedback: Service successfully installed.
7. Enter the command: mysqld -- initialize for initialization (a little longer)
8. Start mysql
D: \ mysql \ bin> net start mys
MySQL service is starting.
The MySQL service has been started successfully.
9. Because the password is automatically generated for the newly installed database, you need to open the mysql \ data folder and find the computer name-PC. err file,
Open the porary password is generated for root @ localhost: RF % B: iXgo1sp line.
This RF % B: iXgo1sp is the automatically generated password. Then, log on to mysql and copy the password to mysql-uroot-p,
Then change the password you want: Command: set password for root @ localhost = password ('new password ');
10. The database is successfully installed. Welcome to the mysql database.