MySQL Installation
I am installing MySQL on Windows. First, log in to the MySQL website to download the installation package.
Select MySQL Installer
Here, select the second installation package to download.
After the download is complete, choose to install the downloaded file, basically choose Next, execute and so on.
Here to enter the password for the database
This name is the name of the database.
The final installation is complete.
Configuring Environment variables
After completing the previous steps, install MySQL and configure environment variables for MySQL. MySQL is installed by default under C:\Program files.
1) Create a new mysql_home variable and configure: C:\Program files\mysql\mysql Server 5.7
Mysql_home:c:\program Files\mysql\mysql Server 5.7
2) Edit the path system variable and add%mysql_home%\bin to the PATH variable. Configure the PATH environment variable, or do not create a new mysql_home variable, but instead directly configure the bin under the MySQL installation directory to the path variable, namely: C:\Program files\mysql\mysql Server 5.7\bin
Path:%mysql_home%\bin
or Path:c:\program files\mysql\mysql Server 5.7\bin
Test whether the installation was successful
Run the command prompt with administrator privileges and start the MySQL service with net start mysql57. Shut down the MySQL service with net stop mysql57. Where mysql57 is the name of the service under Windows MySQL.
See that the installation is complete.
Mysql_workbench Use first open Mysql_workbench software
Click the plus sign in the picture, get, first enter the database account password, account default is root, fill in the Password and click "OK", the connection is established, after the completion, will appear a rectangular box, double-click it
But when I got here, I was connected to the error failed to connect to MySQL on with user root. I'm just going to reboot the database. (Taskbar's software icon right-click >mysql57>restart>start). The simplest way is to restart the computer. After the
is finished, the following interface appears, click on the red Circle
To set the name of the database and save it. Then Apply,finish.
The created database appears on the left side of the interface. Next, create the table. Click the triangle arrow to the left of the purple box, open the Down box, right-click Tables->create Table ...
This will appear in the interface to the right after the previous step. Follow the steps to set the table name, and then click on the double arrow on the right to open the extension, which is the image below. The
Column name represents the property name, datatype represents the type of the property, and clicking on the default type, such as Int,varchar, has a drop-down list to choose from. The PK on the right represents the primary key primary key, NN means not null non-null, AI means auto increment self-increment, generally only use these three. The other meanings are as follows:
Uq:unique (column is part of a unique key) unique
Bin:binary binary (binary data larger than text)
un:unsigned integer
The most significant byte in the Zf:zero fill value is always 0, and is not saved. The
ID in this table is set as the primary key. So there's a light marker ahead.
Click Apply after this. Same as the previous database creation. The
is also created to this table and has two properties in the new table. Such as. Information is added to the table later.
Right-click Srt,srt->select rows-limit1000 in the table above, and then add information to the table. Click Apply again, as before.
Since this, the creation of the database, the creation of tables, the insertion of data into the table is complete
Follow these commands to enter to see the table you just built.  
MySQL Installation and configuration