MySQL Basic Tutorial Part 1 MySQL5.7.18 Installation and Connection Tutorial

MySQL Basic Tutorial Part 1 MySQL5.7.18 Installation and Connection Tutorial

Starting from this article, a new series of articles will be used to introduce and learn MySQL. Why should we learn MySQL? From a product perspective, most software database services still use relational databases. The main database products include Oracle, Microsoft's MSSQL, IBM's DB2, and MySQL, which we are going to introduce. MySQL is the database of choice for many small and medium-sized website servers. It has both free and commercial versions and is currently a product of Oracle. From the perspective of testers, more and more software products are related to data, such as e-commerce and software products for database service queries in a certain field. In addition to basic software functional testing, companies also hope that testers can understand more business knowledge. Usually, these business data most of the time have to deal with databases. Therefore, testers need to master some basic database operations and be able to write SQL query statements. The ability to write SQL query statements is mentioned in many job descriptions.

There are many articles and examples on the Internet for simple SQL statements of adding, deleting, modifying and checking. What I want to do here is to install MySQL and use it simply, and then practice writing SQL queries, so that I can master SQL statements in a more systematic way. Many times, you have SQL practice statements online, but you don’t have a SQL Server environment, so it’s difficult for you to understand and quickly master SQL statements. So, our first article starts with installing the MySQL server and client, creating a database and connecting to the database.

1. Download and install MySQL Server

1. Open the URL: https://dev.mysql.com/downloads/mysql/, where we download the community free version

2. Pull down the page and find the Donwload button. Select the 32-bit or 64-bit version according to your machine's operating system version. The current latest version is 5.7.18

3. After downloading, we will install MySQL Server by default and leave other components unchecked.

4. During the installation process, create a password for root. I set the password to root here, as shown below.

You need to click Add User to add a DAB account: test/123456, enter the username and password, as shown below

Click Next and the installation will be completed by default. After installing MySQL Server, database-related services will start every time you start your computer. Now that we have installed the database server, next we need to install a visual, graphical interface client to connect to the database. Here we use MySQL Workbench.

2. Download and install MySQL Workbench

1. Open the URL https://dev.mysql.com/downloads/workbench/

2. Find "Windows (x86, 64-bit), MSI Installer"

3. Click the Download button

4. On the new page, pull down, we don't need to log in to the account, click No thanks, just start my download.

5. Start downloading.

6. After the download is complete, start the installation, the interface is as follows:

3. Connect to the database on MySQL Workbench

Open MySQL Workbench, the interface is as follows

If the installation is successful, MySQL Workbench will show that the local database can be connected under MySql Connections, as shown below.

Click on this gray background area and a pop-up window will pop up for you to enter the root password. When we installed MySQL Server above, we set the password to root. After entering the password, click Connect to successfully connect to the local database. If this gray box is not displayed, click the + button next to it, enter your username and password according to the panel content, select the database of the local service, and you should be able to connect.

1. Create our own database db1

Click the red box in the above picture, create a new database according to the prompts, enter db1 as the name, select utf-8 for encoding, and the created database can be seen below the left panel.

In the above figure, db1 is our newly created database, and sys is the default database after MySQL Server is installed. In the future, we will use MySQL Workbench to connect to our database, and then manually or use SQL statements to create tables and other related data. The overall interface is as follows.

This is the end of the introduction to the basic SQL environment. The next article will talk about how to create tables and columns in the table under the db1 database.

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Detailed steps to install mysql5.7.18 on Mac
  • How to change password in MySQL 5.7.18
  • MySQL 5.7.18 binary package installation tutorial under Linux (without default configuration file my_default.cnf)
  • mysql5.7.18 decompressed version to start mysql service
  • mysql5.7.18.zip Installation-free version configuration tutorial (windows)
  • Tutorial on installing mysql5.7.18 on mac os10.12
  • Solution to the problem that the entry cannot be found when installing mysql5.7.18
  • CentOS6.8 uses cmake to install MySQL5.7.18
  • Detailed tutorial on installing MySQL 5.7.18 under CentOS 6.5
  • Tutorial on installing mysql5.7.18 on windows10

<<:  Complete steps to configure IP address in Ubuntu 18.04 LTS

>>:  JavaScript implements the drag slider puzzle verification function (html5, canvas)

Recommend

Detailed explanation of :key in VUE v-for

When key is not added to the v-for tag. <!DOCT...

Implementing a distributed lock using MySQL

introduce In a distributed system, distributed lo...

Start a local Kubernetes environment using kind and Docker

introduce Have you ever spent a whole day trying ...

Detailed explanation of CSS weight value (cascading) examples

•There are many selectors in CSS. What will happe...

Solution to the problem that docker nginx cannot be accessed after running

## 1 I'm learning docker deployment recently,...

A simple way to put HTML footer at the bottom of the page

Requirement: Sometimes, when the page content is ...

Selection and thinking of MySQL data backup method

Table of contents 1. rsync, cp copy files 2. sele...

MySQL primary key naming strategy related

Recently, when I was sorting out the details of d...

Master-slave synchronization configuration of Mysql database

Table of contents Mysql master-slave synchronizat...

Mysql master-slave synchronization configuration scheme under Centos7 system

Preface Recently, when working on a high-availabi...

Detailed steps to build the TypeScript environment and deploy it to VSCode

Table of contents TypeScript environment construc...

Two methods to disable form controls in HTML: readonly and disabled

In the process of making web pages, we often use f...