MySQL Tutorial
MySQL Tutorial
MySQL Tutorial
AD
MySQL Tutorial
MySQL is the most popular and a free Open Source Relational Database Management
System (RDBMS). An RDBMS system stores the data in the form of tables that might
be related to each other. MySQL uses Structured Query Language (SQL) to store,
manage and retrieve data, and control the accessibility to the data. It is one of the
best RDBMS being used for developing web-based software applications.
MySQL is written in C and C++. Its SQL parser is written in yacc, but it uses a home-
brewed lexical analyzer.
This tutorial will give you quick start with MySQL and make you comfortable with
MySQL programming.
AD
MySQL Examples
Consider an example table CUSTOMERS created in the MySQL database. This table
contains the details of customers like ID, NAME, AGE, ADDRESS, SALARY.
https://www.tutorialspoint.com/mysql/index.htm 1/8
07/06/2024, 17:05 MySQL Tutorial
Since MySQL uses SQL to manage data, it also uses almost all DDL, DML and DCL
statements. For instance, the following DML statement lists the records of all
customers who are 25 years old.
AD
This Online Editor will save you the time to install the MySQL setup in order to
execute any query. Try our MySQL Online Editor now.
https://www.tutorialspoint.com/mysql/index.htm 2/8
07/06/2024, 17:05 MySQL Tutorial
AD
However, whether you choose MySQL for your application or not, totally depends on
your organization's resources and aim. Usually, MySQL is used by smaller businesses
that do not have large data sets, because of its cost efficiency and simple setup.
AD
Here are some of the top companies actively looking for MySQL experts for roles like
Database Administrator, Database Developer, Database Tester, Data Scientist, ETL
Developer, Database Migration Expert, Cloud Database Expert, and more. They need
people who can manage and optimize their databases, build data-driven applications,
and extract insights from large datasets −
Amazon
Netflix
Infosys
Tech Mahindra
Wipro
Pinterest
https://www.tutorialspoint.com/mysql/index.htm 3/8
07/06/2024, 17:05 MySQL Tutorial
Uber
Wipro
Trello
And many more...
To get started, you can use our user-friendly tutorials, which are designed to help
you learn MySQL and prepare for technical interviews or certification exams. You can
learn at your own pace, anytime and anywhere.
With the right MySQL skills and knowledge, you can kickstart a rewarding career in
the ever-expanding field of data management and analytics. You could be the part of
the professionals who are driving innovation and data-driven decision-making in
some of the world's most renowned companies.
AD
AD
https://www.tutorialspoint.com/mysql/index.htm 4/8
07/06/2024, 17:05 MySQL Tutorial
MySQL was developed by Swedish company MySQL AB, founded by David Axmark,
Allan Larsson, and Michael "Monty" Widenius. It was later bought by Sun
Microsystems in 2008, which was subsequently acquired by Oracle Corporation in
2010.
You can install MySQL from the MySQL Installer Community, along with other MySQL
products you require. The MySQL Installer will allow you to install a certain version of
MySQL or you can customize the installation as per your requirements. For more
detailed information on how to install MySQL, click here.
Since MySQL uses SQL to store and manage the data, the data types used in MySQL
are also the same as data types in SQL. Following are three categories of SQL data
types.
Here are the summarized list of tips which you can follow to start learning MySQL.
Read more articles, watch online courses or buy a book on MySQL to enhance
your knowledge.
https://www.tutorialspoint.com/mysql/index.htm 5/8
07/06/2024, 17:05 MySQL Tutorial
Try to develop a small software using PHP or Python which makes use of the
MySQL database.
The time it takes to learn MySQL varies, but basic proficiency can be gained in a few
weeks with consistent practice. Mastering more advanced features may take a few
months of dedicated learning and hands-on experience. Regular practice and real-
world application contribute to the speed of learning MySQL.
The latest version of MySQL was 8.0. Upgrading to the latest version is
recommended for security and feature enhancements.
To check the MySQL version in Linux, you can use the following command in the
terminal:
mysql --version
This command will display the MySQL client version. If you want to check the server
version, you can use:
Replace "your_username" with your MySQL username, and you will be prompted to
enter your password. After entering the password, the command will display the
MySQL server version.
To access your MySQL database, you can use the MySQL command-line client or a
graphical user interface (GUI) tool. Here are the basic steps for both:
Using MySQL Command-Line Client
https://www.tutorialspoint.com/mysql/index.htm 6/8
07/06/2024, 17:05 MySQL Tutorial
To start, stop, or restart the MySQL server, you can use the command-line interface.
The exact commands may vary depending on your operating system. Here are
instructions for different operating systems:
Windows:
To Restart MySQL Server: You can stop and start the MySQL service using the
commands mentioned above. Alternatively, you can use the MySQL Notifier or
the Services application to restart the MySQL service.
Linux (Ubuntu/Debian):
https://www.tutorialspoint.com/mysql/index.htm 7/8
07/06/2024, 17:05 MySQL Tutorial
macOS:
These are general commands, and depending on your specific setup, you might need
to adjust them. Also, note that on Linux, the service management commands may
vary depending on the distribution (e.g., Ubuntu, CentOS).
Remember to replace "mysql" with the actual service name if it's different in your
system.
A MySQL schema can simply be defined as a blueprint of the database. It stores all
the information of the tables, its attributes and entities. As MySQL is a relational
database management system, it is important to have schema as it also represents
the relationship between the attributes and entities of multiple tables.
As a beginner, you can use our simple and the best MySQL tutorial to learn MySQL.
We have removed all the unnecessary complexity while teaching you these MySQL
concepts. You can start learning it now: Learn MySQL.
https://www.tutorialspoint.com/mysql/index.htm 8/8