{"id":277,"date":"2016-08-07T02:43:14","date_gmt":"2016-08-06T23:43:14","guid":{"rendered":"https:\/\/community.virtono.com\/?p=277"},"modified":"2023-06-21T10:21:30","modified_gmt":"2023-06-21T07:21:30","slug":"introduction-to-mysql-and-how-it-works","status":"publish","type":"post","link":"https:\/\/www.virtono.com\/community\/knowledgebase\/introduction-to-mysql-and-how-it-works\/","title":{"rendered":"Introduction To MySQL and How It Works"},"content":{"rendered":"<h3 style=\"text-align: center;\">This article is a fraction of a Number of Articles on MySQL, to access them click <a href=\"https:\/\/virtono.com\/community\/knowledgebase\/articles-on-mysql\/\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/h3>\n<p><strong>INTRODUCTION<\/strong><\/p>\n<p>Beneath all the cute animations, the smooth transactions, lies the ruins of the backend, and talking about websites, the backend is primarily the database.<\/p>\n<p><strong><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"278\" data-permalink=\"https:\/\/www.virtono.com\/community\/knowledgebase\/introduction-to-mysql-and-how-it-works\/attachment\/frontend-backend-lion-social\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/frontend-backend-lion-social.jpg?fit=500%2C500&amp;ssl=1\" data-orig-size=\"500,500\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"frontend-backend-lion-social\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/frontend-backend-lion-social.jpg?fit=500%2C500&amp;ssl=1\" class=\" wp-image-278 aligncenter\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/frontend-backend-lion-social-300x300.jpg?resize=390%2C390&#038;ssl=1\" alt=\"frontend-backend-lion-social\" width=\"390\" height=\"390\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/frontend-backend-lion-social.jpg?resize=300%2C300&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/frontend-backend-lion-social.jpg?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/frontend-backend-lion-social.jpg?resize=160%2C160&amp;ssl=1 160w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/frontend-backend-lion-social.jpg?resize=320%2C320&amp;ssl=1 320w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/frontend-backend-lion-social.jpg?w=500&amp;ssl=1 500w\" sizes=\"auto, (max-width: 390px) 100vw, 390px\" \/><\/strong><\/p>\n<p>Ever wondered, how the web sites remember you?<\/p>\n<p>The database is responsible for handling information that the web page may display to the user, or maybe to just store your information, but today, it performs both, mostly.<\/p>\n<p>One of the most popular databases of our time is MySQL, because its small, fast, reliable, and works great with PHP, and as we know PHP is popular with web developers, that makes MySQL popular too.<\/p>\n<p><strong>How MySQL Works<\/strong><\/p>\n<p>MYSQL is a software, with MySQL server at its core, and a lot of utility programs, that helps is managing and administration of database.<\/p>\n<p>For example, let say you want to create a new database, you send a message to the MySQL server that says, for instance, \u201ccreate a new database and call it newdb<em>.<\/em>\u201d The MySQL server then creates a subdirectory in its data directory, names the new subdirectory newdb, and puts the necessary files with the required format into the newdb subdirectory. In the same manner, to add data to that database, you send a message to the MySQL server, giving it the data and telling it where you want the data to be added.<\/p>\n<p>But you have to know that the MySQL server, is waiting for requests before you send them.<\/p>\n<p>The MySQL server is usually set up so that it starts when the computer starts and continues running all the time. This is the usual setup for a website. However, it isn\u2019t necessary to set it up to start when the computer starts. If you need to, you can start it manually whenever you want to access a database. When it\u2019s running, the MySQL server listens continuously for messages that are directed to it.<\/p>\n<p><strong>Database Structure<\/strong><\/p>\n<p>MySQL is a Relational Database Management System (RDBMS). MySQL server is capable of managing many databases at the same time. In fact, many people might have different databases managed by a single MySQL server. Each database consists of a structure to hold the data and the data itself. A database can exist without data, only a structure, be totally empty, twiddling its thumbs and waiting for data to be stored in it. Data in a database is stored in one or more tables. You must create the database and the tables before you can add any data to the database. First you create the empty database. Then you add empty tables to the database. Database tables are organized like other tables that you\u2019re used to \u2014 in rows and columns. Each row represents an entity in the database, such as a customer, a book, or a project. Each column contains an item of information about the entity, such as a customer name, a book name, or a project start date. The place where a particular row and column intersect, the individual cell of the table, is called a <em>field.<\/em> Tables in databases can be related. Often a row in one table is related to several rows in another table. For instance, you might have a database containing data about books you own. You would have a book table and an author table. One row in the author table might contain information about the author of several books in the book table. When tables are related, you include a column in one table to hold data that matches data in the column of another table.<\/p>\n<p>Only after you\u2019ve created the database structure can you add data.<\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p>MySQL is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases.<br \/>\nThe MySQL development project has made its source code available under the terms of the GNU General Public License, as well as under a variety of proprietary agreements. MySQL is owned and sponsored by a single for-profit firm, the Swedish company MySQL AB, now owned by Sun Microsystems, a subsidiary of Oracle Corporation.<\/p>\n<p>Members of the MySQL community have created several forks such as Drizzle and MariaDB. Both forks were in progress before the Oracle acquisition (Drizzle was announced 8 months before the Sun acquisition).<\/p>\n<p>Free-software projects that require a full-featured database management system often use MySQL. Such projects include (for example) WordPress, phpBB, Drupal and other software built on the LAMP software stack. MySQL is also used in many high-profile, large-scale World Wide Web products including Wikipedia, Google and Facebook.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article is a fraction of a Number of Articles on MySQL, to access them click here. INTRODUCTION Beneath all the cute animations, the smooth transactions, lies the ruins of the backend, and talking about websites, the backend is primarily the database. Ever wondered, how the web sites remember you?<\/p>\n","protected":false},"author":3,"featured_media":279,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[5],"tags":[],"class_list":["post-277","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-knowledgebase"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/mysql_wallpaper_by_milesandryprower-d9o6y9z.png?fit=1024%2C576&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7ISfL-4t","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":3507,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-lemp-stack-linux-nginx-mysql-and-php-on-ubuntu-22-04\/","url_meta":{"origin":277,"position":0},"title":"How to install LEMP stack (Linux, Nginx, MySQL, and PHP) on Ubuntu 22.04","author":"George B.","date":"June 20, 2023","format":false,"excerpt":"Introduction The LEMP stack is a popular software stack for web development and hosting. It includes four major components: Linux, Nginx, MySQL, and PHP. Each component serves a specific purpose in powering dynamic websites and web applications. Linux is the operating system that serves as the LEMP stack's foundation. In\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-to-install-LEMP-stack-Linux-Nginx-MySQL-PHP-on-Ubuntu-22-04.png?fit=600%2C330&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-to-install-LEMP-stack-Linux-Nginx-MySQL-PHP-on-Ubuntu-22-04.png?fit=600%2C330&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-to-install-LEMP-stack-Linux-Nginx-MySQL-PHP-on-Ubuntu-22-04.png?fit=600%2C330&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":305,"url":"https:\/\/www.virtono.com\/community\/knowledgebase\/how-mysql-and-php-work-together\/","url_meta":{"origin":277,"position":1},"title":"How MySQL and PHP Work Together","author":"Daniel Draga","date":"August 7, 2016","format":false,"excerpt":"This article is a fraction of a Number of Articles on MySQL, to access them click here. You interact with the database by passing messages to the MySQL server. The messages are composed in the SQL language, a standard computer language understood by most database management systems. PHP doesn\u2019t understand\u2026","rel":"","context":"In &quot;Knowledgebase&quot;","block_context":{"text":"Knowledgebase","link":"https:\/\/www.virtono.com\/community\/category\/knowledgebase\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/php___mysql_wallpaper_by_milesandryprower-d9o6yat.png?fit=1024%2C576&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/php___mysql_wallpaper_by_milesandryprower-d9o6yat.png?fit=1024%2C576&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/php___mysql_wallpaper_by_milesandryprower-d9o6yat.png?fit=1024%2C576&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/php___mysql_wallpaper_by_milesandryprower-d9o6yat.png?fit=1024%2C576&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":3791,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-zabbix-on-ubuntu\/","url_meta":{"origin":277,"position":2},"title":"How to Install Zabbix on Ubuntu","author":"George B.","date":"September 2, 2023","format":false,"excerpt":"We will walk you through installing Zabbix on Ubuntu 22.04 in this detailed guide, giving you access to a potent tool for monitoring your IT infrastructure. Monitoring is crucial in the world of system administration. One of the most important aspects of maintaining a strong IT infrastructure is making sure\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/How-to-Install-Zabbix-on-Ubuntu.png?fit=360%2C240&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1036,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/installing-lamp-linux-apache-mysql-php-stack-on-debian-7-server\/","url_meta":{"origin":277,"position":3},"title":"INSTALLING LAMP (LINUX, APACHE, MYSQL &amp; PHP) STACK ON DEBIAN 7 SERVER","author":"Daniel Draga","date":"September 25, 2017","format":false,"excerpt":"LAMP STANDS FOR: L:Linux A:Apache M:MySQL P:PHP What is LAMP? LAMP is a shorthand term for a\u00a0web application platform\u00a0consisting of Linux, Apache, MySQL and one of Perl or PHP. Lamp is an\u00a0\u00a0OPENSOURCE Together, these open source tools provide a world-class platform for deploying web applications TECHNOLOGIES USED IN LAMP: For\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/09\/maxresdefault.jpg?fit=1200%2C750&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/09\/maxresdefault.jpg?fit=1200%2C750&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/09\/maxresdefault.jpg?fit=1200%2C750&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/09\/maxresdefault.jpg?fit=1200%2C750&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/09\/maxresdefault.jpg?fit=1200%2C750&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2976,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/setup-linux-apache-mysql-phplamp-ubuntu-20-04\/","url_meta":{"origin":277,"position":4},"title":"Setup Linux Apache MySQL PHP(LAMP) &#8211; Ubuntu 20.04","author":"George B.","date":"August 5, 2022","format":false,"excerpt":"What is LAMP? LAMP (Linux, Apache, MySQL, PHP\/Perl\/Python) is an acronym that refers to one of the most widely used software stacks for many of the web's most popular applications. Step 1 - Update\/Upgrade your package index sudo apt update sudo apt upgrade Step 2 - Install Apache apt-get install\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/08\/lamp_stack.webp?fit=800%2C432&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/08\/lamp_stack.webp?fit=800%2C432&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/08\/lamp_stack.webp?fit=800%2C432&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/08\/lamp_stack.webp?fit=800%2C432&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":235,"url":"https:\/\/www.virtono.com\/community\/knowledgebase\/lamp-technology\/","url_meta":{"origin":277,"position":5},"title":"LAMP TECHNOLOGY","author":"Daniel Draga","date":"July 30, 2016","format":false,"excerpt":"LAMP STANDS FOR: L:Linux A:Apache M:MySQL P:PHP What is LAMP? LAMP is a shorthand term for a web application platform consisting of Linux, Apache, MySQL and one of Perl or PHP. Lamp is an\u00a0 OPENSOURCE Together, these open source tools provide a world-class platform for deploying web applications TECHNOLOGIES USED\u2026","rel":"","context":"In &quot;Knowledgebase&quot;","block_context":{"text":"Knowledgebase","link":"https:\/\/www.virtono.com\/community\/category\/knowledgebase\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/07\/ic-1.png?fit=1200%2C750&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/07\/ic-1.png?fit=1200%2C750&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/07\/ic-1.png?fit=1200%2C750&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/07\/ic-1.png?fit=1200%2C750&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/07\/ic-1.png?fit=1200%2C750&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/277","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/comments?post=277"}],"version-history":[{"count":3,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/277\/revisions"}],"predecessor-version":[{"id":3570,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/277\/revisions\/3570"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media\/279"}],"wp:attachment":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media?parent=277"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/categories?post=277"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/tags?post=277"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}