{"id":294,"date":"2016-08-07T03:20:09","date_gmt":"2016-08-07T00:20:09","guid":{"rendered":"https:\/\/community.virtono.com\/?p=294"},"modified":"2023-06-21T10:19:36","modified_gmt":"2023-06-21T07:19:36","slug":"mysql-performance-tuning-the-stages-of-tuning","status":"publish","type":"post","link":"https:\/\/www.virtono.com\/community\/knowledgebase\/mysql-performance-tuning-the-stages-of-tuning\/","title":{"rendered":"MySQL Performance Tuning: The stages of Tuning"},"content":{"rendered":"<p 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>.<\/p>\n<p><strong>Why Tune a Database?<\/strong><\/p>\n<p><strong>Cost-effectiveness<\/strong><\/p>\n<p>A system that is tuned can minimize the need to buy additional hardware and other resources to meet the needs of the end users. Tuning may demonstrate that the system being used is excessive for the end users and downsizing is the better option. This may result in multiple levels of savings to include maintenance.<\/p>\n<ul>\n<li><strong>Performance<\/strong><\/li>\n<\/ul>\n<p>A high-performance, well-tuned system produces faster response time and better throughput within the organization. This increases the productivity of the end users. A well-tuned system benefits the organization\u2019s customers, poor response time causes lot of unhappiness and loses business.<\/p>\n<ul>\n<li><strong>Competitive Advantage<\/strong><\/li>\n<\/ul>\n<p>Tuning a system for optimal performance gives the end users the ability to glean more critical information faster than the competitors thus giving the company as a whole an advantage. Tuning the access to the data helps business analysts, who are utilizing business intelligence initiatives based on corporate data, make faster and more precise decisions.<\/p>\n<p><strong>What is Tuned?<\/strong><\/p>\n<p>Careful design of systems and applications is essential to the optimal performance of any database. In most cases the greatest gain in performance can be achieved through tuning the application. The most opportune time to consider performance issues is when the application is in the very early stages of the SDLC.<\/p>\n<ul>\n<li>\u00b7 <strong>Application Design<\/strong><\/li>\n<li>\u00b7 <strong>Application Development<\/strong><\/li>\n<li>\u00b7 <strong>Database Structures<\/strong><\/li>\n<li>\u00b7 <strong>Hardware<\/strong><\/li>\n<\/ul>\n<p><strong>\u00a0<\/strong><\/p>\n<p><strong>Stages of Tuning<\/strong><\/p>\n<ul>\n<li><strong> Application design<\/strong><\/li>\n<li><strong> Application development<\/strong><\/li>\n<li><strong> Database configuration<\/strong><\/li>\n<li><strong> Application maintenance and growth<\/strong><\/li>\n<li><strong> Troubleshooting<\/strong><\/li>\n<\/ul>\n<p><strong>\u00a0<\/strong><\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p style=\"text-align: center;\"><strong>Application Development<\/strong><\/p>\n<p style=\"text-align: center;\"><strong>(Optimizing Queries)<\/strong><\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p>Indexes<\/p>\n<ul>\n<li>In MySQL there are several types of indexes:<\/li>\n<\/ul>\n<p>\u2013 Tree Indexes<\/p>\n<ul>\n<li>B-Trees<\/li>\n<\/ul>\n<p>\u2013 <strong>FULLTEXT <\/strong>indexes (based on words instead of whole<\/p>\n<p>columns)<\/p>\n<ul>\n<li>B+Trees (InnoDB)<\/li>\n<li>T-Trees (NDB)<\/li>\n<li>Red-black binary trees (MEMORY)<\/li>\n<li>R-Trees (MyISAM, spatial indexes)<\/li>\n<\/ul>\n<p>\u2013 Hash indexes (MEMORY and NDB)<\/p>\n<ul>\n<li>The use of indexes to find rows speedes up most queries<\/li>\n<li>Writes become slower with each added index<\/li>\n<\/ul>\n<p>Query Execution Plan<\/p>\n<p>(EXPLAIN)<\/p>\n<ul>\n<li>With <strong>EXPLAIN <\/strong>the query is sent all the way to the optimizer,<\/li>\n<\/ul>\n<p>but not to the storage engine<\/p>\n<ul>\n<li>Instead <strong>EXPLAIN <\/strong>returns the query execution plan<\/li>\n<li><strong>EXPLAIN <\/strong>tells you:<\/li>\n<\/ul>\n<p>\u2013 In which order the tables are read<\/p>\n<p>\u2013 What types of read operations that are made<\/p>\n<p>\u2013 Which indexes could have been used<\/p>\n<p>\u2013 Which indexes are used<\/p>\n<p>\u2013 How the tables refer to each other<\/p>\n<p>\u2013 How many rows the optimizer estimates to retrieve from each table<\/p>\n<p>EXPLAIN Types<\/p>\n<p><strong>system <\/strong>The table has only one row<\/p>\n<p><strong>const <\/strong>At the most one matching row, treated as a constant<\/p>\n<p><strong>eq_ref <\/strong>One row per row from previous tables<\/p>\n<p><strong>ref <\/strong>Several rows with matching index value<\/p>\n<p><strong>ref_or_null <\/strong>Like ref, plus NULL values<\/p>\n<p><strong>index_merge <\/strong>Several index searches are merged<\/p>\n<p><strong>unique_subquery <\/strong>Same as ref for some subqueries<\/p>\n<p><strong>index_subquery <\/strong>As above for non-unique indexes<\/p>\n<p><strong>range <\/strong>A range index scan<\/p>\n<p><strong>index <\/strong>The whole index is scanned<\/p>\n<p><strong>ALL <\/strong>A full table scan<\/p>\n<p><strong>Using index <\/strong>The result is created straight from the index<\/p>\n<p><strong>Using where <\/strong>Not all rows are used in the result<\/p>\n<p><strong>Distinct <\/strong>Only a single row is read per row combination<\/p>\n<p><strong>Not exists <\/strong>A <strong>LEFT JOIN <\/strong>missing rows optimization is used<\/p>\n<p><strong>Using filesort <\/strong>An extra row sorting step is done<\/p>\n<p><strong>Using temporary <\/strong>A temporary table is used<\/p>\n<p><strong>Range checked for each record<\/strong><\/p>\n<p>The read type is optimized individually for each combination of rows from the previous tables<\/p>\n<p>Optimizer Hints<\/p>\n<p><strong>STRAIGHT_JOIN <\/strong>Forces the optimizer to join the tables in the given order<\/p>\n<p><strong>SQL_BIG_RESULTS <\/strong>Together with <strong>GROUP BY <\/strong>or <strong>DISTINCT <\/strong>tells the server to<\/p>\n<p>use disk-based temp tables<\/p>\n<p><strong>SQL_BUFFER_RESULTS <\/strong>Tells the server to use a temp table, thus releasing locks<\/p>\n<p>early (for table-locks)<\/p>\n<p><strong>USE INDEX <\/strong>Hints to the optimizer to use the given index<\/p>\n<p><strong>FORCE INDEX <\/strong>Forces the optimizer to use the index (if possible)<\/p>\n<p><strong>IGNORE INDEX <\/strong>Forces the optimizer not the use the index<\/p>\n<p>Selecting Queries to Optimize<\/p>\n<ul>\n<li>The slow query log<\/li>\n<\/ul>\n<p>\u2013 Logs all queries that take longer than <strong>long_query_time<\/strong><\/p>\n<p>\u2013 Can also log all queries that don\u2019t use indexes with<\/p>\n<p><strong>&#8211;log-queries-not-using-indexes<\/strong><\/p>\n<p>\u2013 To log slow administrative commands use<\/p>\n<p><strong>&#8211;log-slow-admin-statements<\/strong><\/p>\n<p>\u2013 To analyze the contents of the slow log use <strong>mysqldumpslow<\/strong><\/p>\n<ul>\n<li>The general query log can be use to analyze:<\/li>\n<\/ul>\n<p>\u2013 Reads vs. writes<\/p>\n<p>\u2013 Simple queries vs. complex queries<\/p>\n<p style=\"text-align: center;\"><strong>Database Designing<\/strong><\/p>\n<p style=\"text-align: center;\"><strong>(Optimizing Schemas)<\/strong><\/p>\n<p>Normalization<\/p>\n<ul>\n<li>Normalization is a key factor in optimizing your database structure<\/li>\n<\/ul>\n<p>\u2013 Good normalization prevents redundant data from being stored in the same tables<\/p>\n<p>\u2013 By moving redundant data to their own table, this reduces storage requirements and overhead when processing queries<\/p>\n<p>\u2013 Transactional databases should be in the 3rd normal form<\/p>\n<ul>\n<li>For data warehousing and reporting system a star-schema might be a better solution<\/li>\n<\/ul>\n<p>Table Optimizations<\/p>\n<ul>\n<li>Use columns that are as short as possible;<\/li>\n<\/ul>\n<p>\u2013 <strong>INT <\/strong>instead of <strong>BIGINT<\/strong><\/p>\n<p>\u2013 <strong>VARCHAR(10) <\/strong>instead of <strong>VARCHAR(255)<\/strong><\/p>\n<p>\u2013 etc.<\/p>\n<ul>\n<li>Pay special attention to columns that are used in joins<\/li>\n<li>Define columns as <strong>NOT NULL <\/strong>if possible<\/li>\n<li>For hints on saving space, use <strong>PROCEDURE ANALYSE()<\/strong><\/li>\n<li>For data warehousing or reporting systems consider using summary tables for speed<\/li>\n<\/ul>\n<p>Index Optimizations<\/p>\n<ul>\n<li>An index on the whole column is not always necessary<\/li>\n<\/ul>\n<p>\u2013 Instead index just a prefix of a column<\/p>\n<p>\u2013 Prefix indexes take less space and the operations are faster<\/p>\n<ul>\n<li>Composite indexes can be used for searches on the first column(s) in the index<\/li>\n<li>Minimize the size of <strong>PRIMARY KEY<\/strong>s that are used as references in other tables<\/li>\n<\/ul>\n<p>\u2013 Using an <strong>auto_increment <\/strong>column can be more optimal<\/p>\n<ul>\n<li>A <strong>FULLTEXT <\/strong>index is useful for<\/li>\n<\/ul>\n<p>\u2013 word searches in text<\/p>\n<p>\u2013 searches on several columns<\/p>\n<p>MyISAM-Specific Optimizations<\/p>\n<ul>\n<li>Consider which row format to use, dynamic, static or compressed<\/li>\n<\/ul>\n<p>\u2013 Speed vs. space<\/p>\n<ul>\n<li>Consider splitting large tables into static and dynamic parts<\/li>\n<li>Important to perform table maintenance operations regularly or after big <strong>DELETE<\/strong>\/<strong>UPDATE <\/strong>operations<\/li>\n<\/ul>\n<p>\u2013 Especially on tables with dynamic row format<\/p>\n<ul>\n<li>Change the row-pointer size (default 6b) for large (&gt;256Tb) tables or smaller (&lt; 4Gb) tables<\/li>\n<\/ul>\n<p>InnoDB-Specific Optimizations<\/p>\n<ul>\n<li>InnoDB uses clustered indexes<\/li>\n<\/ul>\n<p>\u2013 The length of the <strong>PRIMARY KEY <\/strong>is extremely important<\/p>\n<ul>\n<li>The rows are always dynamic<\/li>\n<\/ul>\n<p>\u2013 Using <strong>VARCHAR <\/strong>instead of <strong>CHAR <\/strong>is almost always better<\/p>\n<ul>\n<li>Maintenance operations needed after<\/li>\n<\/ul>\n<p>\u2013 Many <strong>UPDATE<\/strong>\/<strong>DELETE <\/strong>operations<\/p>\n<ul>\n<li>The pages can become underfilled<\/li>\n<\/ul>\n<p>MEMORY-Specific<\/p>\n<p>Optimizations<\/p>\n<ul>\n<li>Use <strong>BTREE <\/strong>(Red-black binary trees) indexes<\/li>\n<\/ul>\n<p>\u2013 When key duplication is high<\/p>\n<p>\u2013 When you need range searches<\/p>\n<ul>\n<li>Set a size limit for your memory tables<\/li>\n<\/ul>\n<p>\u2013 With &#8212;<strong>max_heap_table_size<\/strong><\/p>\n<ul>\n<li>Remove unused memory<\/li>\n<\/ul>\n<p>\u2013 <strong>TRUNCATE TABLE <\/strong>to completely remove the contents of the<\/p>\n<p>Table<\/p>\n<p>\u2013 A null <strong>ALTER TABLE <\/strong>to free up deleted rows<\/p>\n<p style=\"text-align: center;\"><strong>Optimizing the Server<\/strong><\/p>\n<p>Performance Monitoring<\/p>\n<ul>\n<li>Server performance can be tracked using native OS tools<\/li>\n<\/ul>\n<p>\u2013 vmstat, iostat, mpstat on Unix<\/p>\n<p>\u2013 performance counters on Windows<\/p>\n<ul>\n<li>The <strong>mysqld <\/strong>server tracks crucial performance counters<\/li>\n<\/ul>\n<p>\u2013 <strong>SHOW STATUS <\/strong>gives you a snapshot<\/p>\n<p>\u2013 Can use Cricket, SNMP, custom scripts to graph over time<\/p>\n<p>\u2013 MySQL Administrator<\/p>\n<ul>\n<li>Default graphs<\/li>\n<li>Allows you to create your own graphs<\/li>\n<li>Queries can be tracked using log files<\/li>\n<\/ul>\n<p>\u2013 Can collect every query submitted to the server<\/p>\n<p>\u2013 Slow queries can be logged easily<\/p>\n<p>Monitoring Threads in MySQL<\/p>\n<ul>\n<li>To get a snapshot of all threads in MySQL<\/li>\n<\/ul>\n<p>\u2013 <strong>SHOW FULL PROCESSLIST<\/strong><\/p>\n<p>\u2013 The state column shows what\u2019s going on for each query<\/p>\n<ul>\n<li>Performance problems can often be detected by<\/li>\n<\/ul>\n<p>\u2013 Monitoring the processlist<\/p>\n<p>\u2013 Verifying status variables<\/p>\n<ul>\n<li>Imminent problems can be eliminated by<\/li>\n<\/ul>\n<p>\u2013 Terminating runaway or unnecessary threads with <strong>KILL<\/strong><\/p>\n<p>Tuning MySQL Parameters<\/p>\n<ul>\n<li>Some MySQL options can be changed online<\/li>\n<li>The dynamic options are either<\/li>\n<\/ul>\n<p>\u2013 <strong>SESSION <\/strong>specific<\/p>\n<ul>\n<li>Changing the value will only affect the current connection<\/li>\n<\/ul>\n<p>\u2013 <strong>GLOBAL<\/strong><\/p>\n<ul>\n<li>Changing the value will affect the whole server<\/li>\n<\/ul>\n<p>\u2013 Both<\/p>\n<ul>\n<li>When changing the value <strong>SESSION\/GLOBAL <\/strong>should be specified<\/li>\n<li>Online changes are not persistant over a server restart<\/li>\n<\/ul>\n<p>\u2013 The configuration files have to be changed as well<\/p>\n<ul>\n<li>The current values of all options can be found with<\/li>\n<\/ul>\n<p><strong>SHOW SESSION\/GLOBAL VARIABLES<\/strong><\/p>\n<p>Status Variables<\/p>\n<ul>\n<li>MySQL collects lots of status indicators<\/li>\n<\/ul>\n<p>\u2013 These can be monitored with <strong>SHOW STATUS<\/strong><\/p>\n<ul>\n<li>The variables provide a way of monitoring the server activity<\/li>\n<li>They also act as guides when optimizing the server<\/li>\n<li>The variables can also be viewed with<\/li>\n<\/ul>\n<p>\u2013 <strong>mysqladmin extended-status<\/strong><\/p>\n<p>\u2013 MySQL Administrator<\/p>\n<ul>\n<li>Provides graphical interface for monitoring the variables<\/li>\n<li>Can be very efficient for tracking the health of the server<\/li>\n<\/ul>\n<p>Some Global Options<\/p>\n<ul>\n<li><strong>table_cache <\/strong>(default 64)<\/li>\n<\/ul>\n<p>\u2013 Cache for storing open table handlers<\/p>\n<p>\u2013 Increase this if <strong>Opened_tables <\/strong>is high<\/p>\n<ul>\n<li><strong>thread_cache <\/strong>(default 0)<\/li>\n<\/ul>\n<p>\u2013 Number of threads to keep for reuse<\/p>\n<p>\u2013 Increase if <strong>threads_created <\/strong>is high<\/p>\n<p>\u2013 Not useful if the client uses connection pooling<\/p>\n<ul>\n<li><strong>max_connections <\/strong>(default 100)<\/li>\n<\/ul>\n<p>\u2013 The maximum allowed number of simultaneous connections<\/p>\n<p>\u2013 Very important for tuning thread specific memory areas<\/p>\n<p>\u2013 Each connection uses at least <strong>thread_stack <\/strong>of memory<\/p>\n<p>MyISAM Global Options<\/p>\n<ul>\n<li><strong>key_buffer_size <\/strong>(default 8Mb)<\/li>\n<\/ul>\n<p>\u2013 Cache for storing indices<\/p>\n<p>\u2013 Increase this to get better index handling<\/p>\n<p>\u2013 Miss ratio (<strong>key_reads<\/strong>\/<strong>key_read_requests<\/strong>) should be<\/p>\n<p>very low, at least &lt; 0.03 (often &lt; 0.01 is desirable)<\/p>\n<ul>\n<li>Row caching is handled by the OS<\/li>\n<\/ul>\n<p>MyISAM Thread-Specific<\/p>\n<p>Options<\/p>\n<ul>\n<li><strong>myisam_sort_buffer_size <\/strong>(default 8Mb)<\/li>\n<\/ul>\n<p>\u2013 Used when sorting indexes during <strong>REPAIR\/ALTER TABLE<\/strong><\/p>\n<ul>\n<li><strong>myisam_repair_threads <\/strong>(default 1)<\/li>\n<\/ul>\n<p>\u2013 Used for bulk import and repairing<\/p>\n<p>\u2013 Allows for repairing indexes in multiple threads<\/p>\n<ul>\n<li><strong>myisam_max_sort_file_size<\/strong><\/li>\n<\/ul>\n<p>\u2013 The max size of the file used while re-creating indexes<\/p>\n<p>InnoDB-Specific Optimization<\/p>\n<p>1\/2<\/p>\n<ul>\n<li><strong>innodb_buffer_pool_size <\/strong>(default 8Mb)<\/li>\n<\/ul>\n<p>\u2013 The memory buffer InnoDB uses to cache both data and<\/p>\n<p>indexes<\/p>\n<p>\u2013 The bigger you set this the less disk i\/o is needed<\/p>\n<p>\u2013 Can be set very high (up to 80% on a dedicated system)<\/p>\n<ul>\n<li><strong>innodb_flush_log_at_trx_commit <\/strong>(default 1)<\/li>\n<\/ul>\n<p>\u2013 0 writes and sync\u2019s once per second (not ACID)<\/p>\n<p>\u2013 1 forces sync to disk after every commit<\/p>\n<p>\u2013 2 write to disk every commit but only sync\u2019s about once per<\/p>\n<p>Second<\/p>\n<p>InnoDB-Specific Optimization<\/p>\n<p>2\/2<\/p>\n<ul>\n<li><strong>innodb_log_buffer_size <\/strong>(default 1Mb)<\/li>\n<\/ul>\n<p>\u2013 Larger values allows for larger transactions to be logged in<\/p>\n<p>memory<\/p>\n<p>\u2013 Sensible values range from 1M to 8M<\/p>\n<ul>\n<li><strong>innodb_log_file_size <\/strong>(default 5Mb)<\/li>\n<\/ul>\n<p>\u2013 Size of each InnoDB redo log file<\/p>\n<p>\u2013 Can be set up to <strong>buffer_pool_size<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article is a fraction of a Number of Articles on MySQL, to access them click here. Why Tune a Database? Cost-effectiveness A system that is tuned can minimize the need to buy additional hardware and other resources to meet the needs of the end users. Tuning may demonstrate that<\/p>\n","protected":false},"author":3,"featured_media":295,"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-294","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\/Screen-Shot-2015-08-10-at-7.56.20-AM.png?fit=378%2C127&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7ISfL-4K","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":338,"url":"https:\/\/www.virtono.com\/community\/knowledgebase\/articles-on-mysql\/","url_meta":{"origin":294,"position":0},"title":"Articles on MySQL","author":"Daniel Draga","date":"August 7, 2016","format":false,"excerpt":"MySQL:\u00a0 Introduction and How it Works MySQL Installation MySQL replication The Top MySQL 10 Design Tips MySQL Performance Tuning: The stages of Tuning MySQL Indexing How to create an index How MySQL and PHP Work Together How to handle MySQL errors Constraints in SQL and How to Specify Them","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\/MySQL-Foreign-Key-EXAMPLE-2-1.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/MySQL-Foreign-Key-EXAMPLE-2-1.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/MySQL-Foreign-Key-EXAMPLE-2-1.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/MySQL-Foreign-Key-EXAMPLE-2-1.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/MySQL-Foreign-Key-EXAMPLE-2-1.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3496,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-tune-your-mysql-server-for-optimal-performance\/","url_meta":{"origin":294,"position":1},"title":"How to Tune Your MySQL Server for Optimal Performance","author":"George B.","date":"June 12, 2023","format":false,"excerpt":"In this step-by-step guide, we will walk you through the process of tuning your MySQL server, helping you enhance its efficiency and responsiveness. MySQL is one of the most popular open-source relational database management systems, widely used for various applications and websites. However, as your database grows in size and\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\/1.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\/1.png?fit=600%2C330&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/1.png?fit=600%2C330&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"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":294,"position":2},"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":732,"url":"https:\/\/www.virtono.com\/community\/knowledgebase\/hardening-the-defense-of-database-server\/","url_meta":{"origin":294,"position":3},"title":"Hardening the Defense of Database Server","author":"Daniel Draga","date":"November 1, 2016","format":false,"excerpt":"Importance of Database Security: Databases often store sensitive data Incorrect data or loss of data could negatively affect business operations Databases can be used as bases to attack other systems from. \u00a0 Principles of Finding Holes Don't believe the documentation Implement your own client Debug the system to understand how\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\/11\/network-security1.jpg?fit=1200%2C556&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/11\/network-security1.jpg?fit=1200%2C556&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/11\/network-security1.jpg?fit=1200%2C556&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/11\/network-security1.jpg?fit=1200%2C556&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/11\/network-security1.jpg?fit=1200%2C556&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":297,"url":"https:\/\/www.virtono.com\/community\/knowledgebase\/mysql-indexing\/","url_meta":{"origin":294,"position":4},"title":"MySQL Indexing","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. MySQL Indexing \u00a0 MySQL documentation says: The best way to improve the performance of SELECT operations is to create indexes on one or more of the columns that are tested in the query.\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\/MySQL_Replication1-3.png?fit=715%2C262&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/MySQL_Replication1-3.png?fit=715%2C262&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/MySQL_Replication1-3.png?fit=715%2C262&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/MySQL_Replication1-3.png?fit=715%2C262&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":3746,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-create-a-user-and-grant-permissions-in-mysql\/","url_meta":{"origin":294,"position":5},"title":"How to create a user and grant permissions in MySQL","author":"George B.","date":"August 17, 2023","format":false,"excerpt":"Managing users is an integral part of database administration. It involves adding new users, giving them access, and, if necessary, deleting them. In this tutorial, we'll examine MySQL's user management procedure, which makes it the most widely used relational database management system available as open-source software. Creating a New User\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\/08\/Create-a-user-and-grant-permissions-in-MySQL.png?fit=360%2C240&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/294","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=294"}],"version-history":[{"count":4,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/294\/revisions"}],"predecessor-version":[{"id":3568,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/294\/revisions\/3568"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media\/295"}],"wp:attachment":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media?parent=294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/categories?post=294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/tags?post=294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}