MySQL tutoring: what is it and how to use the system

By Rebecca
19 Min Read
MySQL tutoring

MySQL tutoring: MySQL is an open-source relational database management system (RDBMS) supported by Oracle and based on structured query language (SQL). The system works on virtually all platforms, including Linux, UNIX, and Windows.

The system is an important component of an open-source toolset called LAMP, which uses Linux as the operating system, Apache as the web server, MySQL as the relational database management system, and PHP, Perl, or Python as the oriented scripting language to objects.

Although it can be used in a wide variety of applications, the database manager is most often associated with web applications and online publishing. Thus, behind many of the world’s leading websites, the tool used is the RDBMS, as well as countless web-based consumer and business applications such as Facebook, Twitter, and YouTube.

Originally conceived in 1995 by the Swedish company MySQL AB, the program was acquired by Sun Microsystems in 2008, which, in turn, passed to Oracle in 2010. Developers can use the software for free, but companies must obtain it. a commercial license.

MySQL tutoring

MySQL tutoring: How to use?

With a simple and easy-to-use setup, the tool works on virtually all platforms, including Linux, UNIX, and Windows. Although it is possible to install and use the system via command lines, the easiest way to use the software is through the MySQL Workbench graphical interface, which is available for Windows, Linux, and Mac OS.


We will focus on installing the database manager for Windows, and the process is similar for other operating systems. The beginning involves two steps:

MySQL tutoring: Setting up a server

After finishing the installations, you need to perform the setup as shown below.

1. The first step is to open the program.

2. On the home screen, click “+” next to MySQL Connections.

3. To get started, you can create a connection to a locally installed server. Click the “Configure Server Management” button in the “Setup New Connection” window to check the server configuration.

4. A new window opens with the name “Configure Local Management”; then click the “Next” button to continue.

5. A popup window will ask for your root password to test your connection to the local MySQL server instance. The password is the one you set during the software installation.

6. Next, the wizard will test the database connections. If the test fails, go back and correct the database connection parameters. Otherwise, if all tests are successful, click “Next” to continue.

7. After that, a new wizard will open under “Local Service Management”, which allows switching between multiple database servers installed on one machine. You can ignore this and click “Next” to continue.

8. The wizard will then verify the ability to access the system server configuration file and test start or stop commands.

9. Then you can review the current settings; after reviewing them, click “Finish” for the final server configuration.

10. The next step is to set up a connection that can be used to connect to the server. If you haven’t created it yet, you can use the default values ​​provided. Click “Test Connection” after entering the connection name.

11. A new dialog will open asking for the password of the root or selected user. If your root user has a password, you can enter it using the “Save Password in Vault” feature. Click “OK”.

12. If the password entered for the user is correct, a screen with the connection information will appear, and everything will be ready for you to start building a database.

MySQL tutoring: First steps

MySQL tutoring: After completing the server setup, you can begin to effectively use the system. Check out the initial sections to use the program’s graphical interface.

The most important functions of the program can be summarized as:

  • models, which allows the creation of a new database model, with the addition of tables, columns, and their respective values;
  • diagram, which offers a graphical view of the tables and allows the creation of relationships between them, allowing the automatic updating of information;
  • deploy, in this, after the completion of the database, the command allows to start the operation of the information system.

Now that you have the initial knowledge, it’s time to test your knowledge of MySQL in practice.

MySQL tutoring: how to use it on your business website

MySQL is a type of database that organizes your website information. But what are its main features? How to use it? Understanding this information is essential for your website to remain organized, safe, and accessible to people.

The first steps to create a website come down to choosing the domain and hosting server. Inside it, the database works, essential for the information to be well organized, with security, and facilitate access to users.

MySQL tutoring: How does hosting a website work?

It’s important that you know how a website or blog hosting works. Basically, it’s a server that offers a space on the internet to store your page files.

Every time someone accesses your website, they see the contents of the text, video, images, documents, among others, right? This is only possible because they are safely stored on the server you have hired.

But how to choose a hosting server? As there are several options available, you need to select the one that best suits your needs. There are two types of hosting servers: shared and dedicated.

The shared server provides a space on the internet to host your website but shared it with other users. For this reason, they are cheaper plans and are recommended for sites that still do not have very strong traffic.

Otherwise, if you have a “boom” of hits on shared hosting, the site may go down (causing Error 500 ). If this happens frequently, it is a sign that it is best to hire a dedicated server.

The dedicated server offers greater potential for your site to receive a more robust demand and not sin in terms of performance. The price is more expensive, but the investment is worth it to ensure that your website will remain on the air to generate more opportunities for your company.

Of course, there are other solutions so you can delegate this task and focus even more on results. One of them is Stage, which has its server and plans that you can choose according to your company’s needs at the time.

MySQL tutoring: How important are databases?

The database stores and organizes all the information on your website so that it makes sense every time someone accesses it. To make the understanding even clearer, let’s think, for example, of a closet where you keep your clothes.

Now, imagine if all of the—shirts, pants, socks, and the like—were crammed together in one space. It would be very confusing, wouldn’t it? On the other hand, if shirts are kept in one space, pants and socks in separate drawers, everything is tidier and you can see where everything is.

The same work is performed by the database. All the information on your website — texts, images, documents, etc. — are organized so that people who access it see them consistently.

This way, visitors can have a better browsing experience. Your work routine is also more relaxed since you can access and restore your website data whenever you find it necessary.


MySQL tutoring: How is a database managed?

The first point to be considered in database management is to assess the infrastructure of the system to be used. That is, you should check if it is meeting all your needs.

Once you have this certainty, the next step is to organize the methodology that is most adequate to the demands and that makes it possible to find information on the website, according to your business preferences.

After all, if other members of the company, in addition to you, also access your website’s dashboard, it is important that the organization of this data is simple and efficient, such as when managing a CRM.

After organizing the methodology, see how these tasks can be automated, such as in terms of backup. So that you don’t lose the information, automatic backup copies should be made periodically.

Thus, you get an overview of your data management to make sure that everything is according to your plan and identify points that need to be optimized.

MySQL tutoring: History

MySQL’s original development took place in 1994, but MySQL had its first version introduced to the public the following year. At first, it was created for personal use from mSQL, using as a basis the ISAM language, which was considered low level.

Then they created a new SQL interface, with the same API that was used in MSQL, giving rise to MySQL.

MySQL tutoring: What are the main products?

  • MySQL Enterprise Edition: brings advanced features, in addition to management and support tools so that your website’s database has better performance, being the most appropriate for businesses that do not want to suffer risks related to their data;
  • MySQL Standard Edition: aimed at the input of OLTP (Online Transaction Processing) type applications, its main feature is that it facilitates the use of MySQL;
  • MySQL Classic Edition: incorporates the database for ISVs, OEMs, and VARs, and is recognized as a high-performance database;
  • MySQL Cluster: a database that manages to combine high availability and linear scalability, which is why its development was made for sites that are in critical condition;
  • MySQL Community Edition: the free version of the database, available under the GPL license, in addition to having a huge community of developers who help each other to clarify doubts and optimize performance.

MySQL tutoring: What are the main services?

MySQL has four main types of service:

MySQL tutoring: What are MySQL clients?

To understand the relevance of a tool, it’s important to see who your customers are. Therefore, we list some of them here:

  • GitHub ;
  • Airbnb;
  • Booking . with ;
  • NASA;
  • Bank of America;
  • Bayer;
  • Tesla ;
  • Netflix ;
  • Spotify ;
  • YouTube ;
  • LATAM Airlines;
  • Twitter ;
  • Nokia.

MySQL tutoring: How to connect the site to MySQL?

Generally, MySQL is included in most hosting plans offered by the main host servers on the market. After logging in, just access cPanel and search for the MySQL field.

However, in case your server does not have this option, we will point out here how the connection can be made by PHP.

MySQL tutoring: How to Connect MySQL Using PHP

PHP is an open-source programming language and is offered for free. It can be used for various purposes, but its main bias is web development.

Access to the MySQL database can be done directly via PHP scripts in which the databases are written to the website. Before showing the step by step to do this, it is necessary to understand the meaning of each nomenclature that must be inserted in the codes. Are they:

  • host: refers to the hosting provider connecting to the database;
  • user: is who accesses the bank;
  • password: code that grants access to the bank;
  • base: this is the name given to the bank to be accessed.

MySQL tutoring: How to use MySQL?

To start using MySQL, you need to have it installed and configured on your server. The graphical interface is provided by Oracle and is called MySQL Workbench, with versions for both Windows and Linux and Mac OS.

Here, you have access to the administrative part of MySQL and are able to define all system attributes and relationships, such as memory usage, processing, and database connections.

There are also configurations of more complex order, such as the TCP port and the folders that keep the database files referring to encoding and access permissions.

In addition, you can perform queries within the Workbench to find information in your bank that is more specific. To perform a search, just insert the term at the top of the window so that the results are displayed in the Output tab and in the Overview, which displays the names of the tables, in addition to the system routines.

That way you can use MySQL inside your server. If you have questions about how to access it from your dashboard, we suggest asking the host’s support team for help.

MySQL ensures that the data and files that make up your website are stored securely and organized. This helps to maintain good performance, improving the experience of visitors to your page.

By the way, if you are looking for a hosting server for your website or change the one you already use, it is recommended to know well all that exist in the market.

Read more: How to properly uninstall and remove WordPress website

MySQL tutoring: Using IN – AND – OR Operators in MySQL

MySQL has 3 operators that are very useful. They are called IN operator – OR operator and AND operator.
They behave quite differently and it is very common to get confused with them. When do I use one and when do I use another?

Let’s use the City table for this tutorial.

Let’s look at some simple rules to use.

MySQL AND operator

We use the AND operator to add a condition that needs to be true.

This query will return cities with ContryCode BRA and Population greater than 1000000 and District equal to São Paulo, all three conditions must be true.

MySQL OR operator

We use the OR operator to add a condition that either has to be true.

This query will return Cities that have a population greater than 1000000 or have a district equal to São Paulo

MySQL IN operator

We use the IN operator the same way we use OR, but for the same column.

The two queries will return the same result, cities that are in the USA, BRA, or IRL.

MySQL tutoring: Record session in MySQL

MySQL tutoring: We are going to see a very useful option of the MySQL command that will record everything we type in the console and also the return received. There is the –tee option. To use it is easy, just add the –tee=/path/to/file



For website maintenance service contact us.

Posted by Rebecca
Rebecca is an Independent content writer for breldigital, She writes content on any given topic. She loves to write a case study article or reviews on a brand, Be it any topic, she nails it