MySQL Installation and configuration

Source: Internet
Author: User

80710349

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 the 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 always connected 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 you have finished, you will see the following screen, click on the red circle


Set the database name yourself and save it. Then Apply,finish.


Then 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 on 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.

Column name represents the property name, datatype represents the type of the property, and clicking 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 (larger binary data than text)
un:unsigned integer
The most significant byte in the Zf:zero fill value is always 0, and is not saved.
In this table, the ID is set as the primary key. So there's a light marker ahead.
Click Apply after this. Same as the previous database creation.

This table has also been created, with two properties in the new table. Such as. Information is added to the table later.

Right-click the Srt,srt->select rows-limit1000 in the table above, and then add the information to the table. Click Apply again, as before.
Since then, the creation of the database, the creation of the table, and the insertion of data into the table are complete.

Follow these commands to enter to see the table you just built.


MySQL Installation and configuration

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.