<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>mysql Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/mysql/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Sat, 21 Feb 2026 07:13:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>Mastering Stored Procedures: Concepts, Use Cases, Architecture and Getting Started</title>
		<link>https://www.scmgalaxy.com/tutorials/mastering-stored-procedures-concepts-use-cases-architecture-and-getting-started/</link>
					<comments>https://www.scmgalaxy.com/tutorials/mastering-stored-procedures-concepts-use-cases-architecture-and-getting-started/#respond</comments>
		
		<dc:creator><![CDATA[Vijay K]]></dc:creator>
		<pubDate>Fri, 30 May 2025 11:39:00 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[DatabaseProgramming]]></category>
		<category><![CDATA[DatabaseSecurity]]></category>
		<category><![CDATA[DataIntegrity]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[PerformanceOptimization]]></category>
		<category><![CDATA[PLSQL]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[SQLServer]]></category>
		<category><![CDATA[StoredProcedures]]></category>
		<category><![CDATA[TransactionManagement]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=12481</guid>

					<description><![CDATA[<p>What are Stored Procedures? Stored procedures are precompiled sets of SQL statements and procedural logic that reside in a database. [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/mastering-stored-procedures-concepts-use-cases-architecture-and-getting-started/">Mastering Stored Procedures: Concepts, Use Cases, Architecture and Getting Started</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="683" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/05/image-130-1024x683.png" alt="" class="wp-image-12485" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/05/image-130-1024x683.png 1024w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/05/image-130-300x200.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/05/image-130-768x512.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/05/image-130.png 1536w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">What are Stored Procedures?</h2>



<p class="wp-block-paragraph">Stored procedures are precompiled sets of SQL statements and procedural logic that reside in a database. They encapsulate frequently executed or complex database operations, allowing developers to execute them repeatedly by calling the procedure rather than rewriting SQL code each time.</p>



<p class="wp-block-paragraph">Stored procedures can include control-flow statements such as loops, conditionals, and error handling, enabling advanced processing inside the database server. Because they are precompiled, stored procedures often offer improved performance and reduced network traffic compared to sending raw queries from applications.</p>



<p class="wp-block-paragraph">Supported by virtually all major relational database management systems (RDBMS) — including Oracle, SQL Server, MySQL, PostgreSQL — stored procedures are powerful tools for database-centric application logic.</p>



<hr class="wp-block-separator has-alpha-channel-opacity">



<h2 class="wp-block-heading">Major Use Cases of Stored Procedures</h2>



<h3 class="wp-block-heading">1. Encapsulation of Business Logic</h3>



<p class="wp-block-paragraph">Stored procedures centralize critical business rules and complex data operations, ensuring consistent enforcement across all applications and users accessing the database.</p>



<h3 class="wp-block-heading">2. Performance Optimization</h3>



<p class="wp-block-paragraph">Because stored procedures are compiled and cached by the database server, they execute faster than dynamic queries. They also reduce client-server communication by bundling multiple operations into a single call.</p>



<h3 class="wp-block-heading">3. Security and Access Control</h3>



<p class="wp-block-paragraph">Stored procedures can restrict direct access to tables, exposing only controlled interfaces to manipulate data. This limits SQL injection risks and protects sensitive data.</p>



<h3 class="wp-block-heading">4. Data Validation and Integrity</h3>



<p class="wp-block-paragraph">Procedures can enforce validation rules, constraints, and transactional consistency, preventing invalid data modifications.</p>



<h3 class="wp-block-heading">5. Batch Processing and ETL</h3>



<p class="wp-block-paragraph">Stored procedures are commonly used for data transformation, cleanup, and bulk loading tasks in Extract, Transform, Load (ETL) processes.</p>



<h3 class="wp-block-heading">6. Reporting and Auditing</h3>



<p class="wp-block-paragraph">Complex queries and reporting logic are often implemented as stored procedures, enabling efficient execution and centralized maintenance. Auditing logic can also be embedded in procedures.</p>



<hr class="wp-block-separator has-alpha-channel-opacity">



<h2 class="wp-block-heading">How Stored Procedures Work Along with Architecture</h2>



<p class="wp-block-paragraph">Stored procedures operate within the RDBMS architecture and interact closely with its components:</p>



<h3 class="wp-block-heading">1. Database Server</h3>



<p class="wp-block-paragraph">The core server processes incoming SQL statements, executes stored procedures, and manages data access and concurrency.</p>



<h3 class="wp-block-heading">2. Procedure Storage</h3>



<p class="wp-block-paragraph">Stored procedures are stored as schema objects in the database&#8217;s system catalogs. They are precompiled into an execution plan, which the server caches to optimize performance.</p>



<h3 class="wp-block-heading">3. Execution Engine</h3>



<p class="wp-block-paragraph">When called, the execution engine retrieves the precompiled plan and runs it with any input parameters, processing logic and returning output or result sets.</p>



<h3 class="wp-block-heading">4. Transaction Management</h3>



<p class="wp-block-paragraph">Stored procedures typically run within transactional contexts, supporting commit and rollback, ensuring atomicity of complex operations.</p>



<h3 class="wp-block-heading">5. Security and Permissions</h3>



<p class="wp-block-paragraph">Execution privileges can be granted or revoked at the procedure level, controlling who can execute specific logic.</p>



<h3 class="wp-block-heading">6. Client Interaction</h3>



<p class="wp-block-paragraph">Applications invoke stored procedures via database drivers (ODBC, JDBC) by sending procedure calls with parameters. Results are returned as datasets or status codes.</p>



<hr class="wp-block-separator has-alpha-channel-opacity">



<h2 class="wp-block-heading">Basic Workflow of Stored Procedures</h2>



<ol class="wp-block-list">
<li><strong>Requirement Analysis:</strong> Identify repetitive, complex, or sensitive database operations suitable for encapsulation.</li>



<li><strong>Design and Development:</strong> Write the procedure using SQL and procedural extensions (e.g., PL/SQL, T-SQL).</li>



<li><strong>Testing:</strong> Validate the procedure logic, input/output parameters, and error handling.</li>



<li><strong>Deployment:</strong> Save the procedure in the database schema.</li>



<li><strong>Invocation:</strong> Applications or users execute the procedure by calling it with parameters.</li>



<li><strong>Maintenance:</strong> Update and optimize procedures as business logic or data evolves.</li>
</ol>



<hr class="wp-block-separator has-alpha-channel-opacity">



<h2 class="wp-block-heading">Step-by-Step Getting Started Guide for Stored Procedures</h2>



<h3 class="wp-block-heading">Step 1: Understand Your Database Environment</h3>



<ul class="wp-block-list">
<li>Identify your RDBMS (Oracle, SQL Server, MySQL, PostgreSQL).</li>



<li>Learn the procedural language it supports (PL/SQL, T-SQL, etc.).</li>
</ul>



<h3 class="wp-block-heading">Step 2: Create a Simple Stored Procedure</h3>



<p class="wp-block-paragraph">Example in SQL Server:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
CREATE PROCEDURE GetCustomerById
    @CustomerId INT
AS
BEGIN
    SELECT * FROM Customers WHERE CustomerID = @CustomerId;
END;

</pre></div>


<h3 class="wp-block-heading">Step 3: Execute the Stored Procedure</h3>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
EXEC GetCustomerById @CustomerId = 1;

</pre></div>


<h3 class="wp-block-heading">Step 4: Add Input and Output Parameters</h3>



<p class="wp-block-paragraph">Example with output parameter:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
CREATE PROCEDURE GetTotalOrders
    @CustomerId INT,
    @OrderCount INT OUTPUT
AS
BEGIN
    SELECT @OrderCount = COUNT(*) FROM Orders WHERE CustomerID = @CustomerId;
END;

</pre></div>


<p class="wp-block-paragraph">Calling it:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
DECLARE @Count INT;
EXEC GetTotalOrders @CustomerId = 1, @OrderCount = @Count OUTPUT;
SELECT @Count;

</pre></div>


<h3 class="wp-block-heading">Step 5: Implement Control Flow and Error Handling</h3>



<p class="wp-block-paragraph">Use IF statements, loops, TRY-CATCH blocks to handle logic and exceptions.</p>



<p class="wp-block-paragraph">Example:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
CREATE PROCEDURE UpdateStock
    @ProductId INT,
    @Quantity INT
AS
BEGIN
    BEGIN TRY
        BEGIN TRANSACTION;
        UPDATE Inventory SET Stock = Stock - @Quantity WHERE ProductID = @ProductId;
        IF @@ROWCOUNT = 0
        BEGIN
            THROW 50000, &#039;Product not found.&#039;, 1;
        END
        COMMIT TRANSACTION;
    END TRY
    BEGIN CATCH
        ROLLBACK TRANSACTION;
        THROW;
    END CATCH
END;

</pre></div>


<h3 class="wp-block-heading">Step 6: Optimize and Secure</h3>



<ul class="wp-block-list">
<li>Analyze execution plans.</li>



<li>Add indexes to support queries.</li>



<li>Restrict permissions to execute procedures.</li>



<li>Avoid dynamic SQL inside procedures to reduce SQL injection risks.</li>
</ul>



<h3 class="wp-block-heading">Step 7: Integrate with Applications</h3>



<ul class="wp-block-list">
<li>Call stored procedures from application code using database drivers.</li>



<li>Pass parameters and handle returned datasets or output parameters.</li>
</ul>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/mastering-stored-procedures-concepts-use-cases-architecture-and-getting-started/">Mastering Stored Procedures: Concepts, Use Cases, Architecture and Getting Started</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/mastering-stored-procedures-concepts-use-cases-architecture-and-getting-started/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Understanding MySQL: Architecture, Use Cases, and Getting Started Guide</title>
		<link>https://www.scmgalaxy.com/tutorials/understanding-mysql-architecture-use-cases-and-getting-started-guide/</link>
					<comments>https://www.scmgalaxy.com/tutorials/understanding-mysql-architecture-use-cases-and-getting-started-guide/#respond</comments>
		
		<dc:creator><![CDATA[Vijay K]]></dc:creator>
		<pubDate>Tue, 06 May 2025 15:57:21 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[DatabaseManagement]]></category>
		<category><![CDATA[DataStorage]]></category>
		<category><![CDATA[LAMPStack]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[WebDevelopment]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=12234</guid>

					<description><![CDATA[<p>What is MySQL? MySQL is an open-source relational database management system (RDBMS) that is widely used for storing and managing [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/understanding-mysql-architecture-use-cases-and-getting-started-guide/">Understanding MySQL: Architecture, Use Cases, and Getting Started Guide</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-full is-resized"><img decoding="async" width="750" height="422" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/05/image-15.png" alt="" class="wp-image-12235" style="width:840px;height:auto" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/05/image-15.png 750w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/05/image-15-300x169.png 300w" sizes="(max-width: 750px) 100vw, 750px" /></figure>



<hr class="wp-block-separator has-alpha-channel-opacity">



<h3 class="wp-block-heading">What is MySQL?</h3>



<p class="wp-block-paragraph">MySQL is an open-source relational database management system (RDBMS) that is widely used for storing and managing data in web applications, businesses, and various software systems. It uses Structured Query Language (SQL) to interact with the database and is one of the most popular RDBMS options available, especially for applications built using PHP, Python, and Java.</p>



<p class="wp-block-paragraph">Originally developed by MySQL AB in 1995, MySQL was acquired by Sun Microsystems in 2008, which was then acquired by Oracle Corporation in 2010. Despite its ownership by Oracle, MySQL remains open-source under the GNU General Public License (GPL), though Oracle also offers paid commercial versions of MySQL with advanced features and support.</p>



<p class="wp-block-paragraph">MySQL is known for its speed, reliability, and ease of use, making it a preferred choice for developers and organizations around the world. It is often used in conjunction with web development technologies, such as PHP, and is a core component of the LAMP stack (Linux, Apache, MySQL, PHP/Python).</p>



<h3 class="wp-block-heading">Major Use Cases of MySQL</h3>



<ol class="wp-block-list">
<li><strong>Web Applications</strong>: MySQL is widely used for developing dynamic web applications, particularly those built using the LAMP stack (Linux, Apache, MySQL, PHP/Python). It is commonly used in content management systems (CMS) like WordPress, Drupal, and Joomla, as well as in e-commerce platforms like Magento.</li>



<li><strong>Data Warehousing</strong>: MySQL can handle large volumes of data, making it suitable for data warehousing applications. It allows users to store and retrieve data efficiently for business intelligence and analytics.</li>



<li><strong>Online Transaction Processing (OLTP)</strong>: MySQL is well-suited for OLTP systems, such as financial applications, booking systems, and inventory management systems, where fast and reliable data retrieval and updates are critical.</li>



<li><strong>Content Management Systems (CMS)</strong>: Many CMS platforms, such as WordPress, use MySQL as the backend database to manage content, user data, and metadata.</li>



<li><strong>Customer Relationship Management (CRM) Systems</strong>: MySQL is frequently used in CRM systems for managing customer data, interactions, and transaction records, enabling businesses to improve customer relationships.</li>



<li><strong>Mobile Applications</strong>: MySQL is often employed in mobile app development to store user data, transactions, and app-related information. It can be integrated with various mobile platforms through APIs.</li>



<li><strong>Big Data Applications</strong>: While not as robust as specialized systems like Hadoop or NoSQL databases, MySQL can handle big data tasks for applications that do not require complex data processing. With enhancements like MySQL Cluster, it can manage large datasets and provide real-time data access.</li>



<li><strong>Gaming Databases</strong>: In the gaming industry, MySQL is used to store player data, game progress, transactions, and interactions in massively multiplayer online games (MMOs) and mobile games.</li>
</ol>



<h3 class="wp-block-heading">How MySQL Works: Architecture</h3>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="576" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/05/image-16-1024x576.png" alt="" class="wp-image-12236" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/05/image-16-1024x576.png 1024w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/05/image-16-300x169.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/05/image-16-768x432.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/05/image-16.png 1280w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">MySQL follows a client-server architecture, where the client (such as a web application) communicates with the MySQL server, which is responsible for handling queries and performing operations on the database.</p>



<p class="wp-block-paragraph">The architecture can be broken down into the following key components:</p>



<ol class="wp-block-list">
<li><strong>Client Layer</strong>: This is the layer where applications or users interact with the database. Clients send SQL queries to the MySQL server, which processes and returns results. The client can be any application that interacts with the database, such as a web application, a script, or a database management tool like phpMyAdmin or MySQL Workbench.</li>



<li><strong>Query Processor</strong>: The query processor receives SQL commands from clients and parses them to check for syntax errors. It optimizes the query for performance and creates an execution plan.</li>



<li><strong>SQL Execution Engine</strong>: After query optimization, the SQL execution engine runs the query against the stored data. It handles operations like inserting, updating, deleting, or retrieving data from the database.</li>



<li><strong>Storage Engine</strong>: The storage engine is responsible for managing how data is stored and retrieved on disk. MySQL supports multiple storage engines, with <strong>InnoDB</strong> being the default engine for most use cases. InnoDB provides ACID compliance (Atomicity, Consistency, Isolation, Durability), foreign key support, and transaction management.</li>



<li><strong>Data Files</strong>: MySQL stores data in a variety of files, including database files, log files, and index files. The database files store the actual data, while index files improve query performance by storing indexed columns for faster access.</li>



<li><strong>Query Cache</strong>: MySQL has an optional query cache that stores the results of SELECT queries to improve performance. If a query is repeated, the results can be retrieved from the cache rather than being re-executed.</li>



<li><strong>Replication</strong>: MySQL supports master-slave replication, where data from the master server is replicated to one or more slave servers. This setup improves data availability and can be used for load balancing and backup purposes.</li>



<li><strong>Transactions and ACID Properties</strong>: MySQL supports transactions, which allow multiple operations to be executed as a single unit of work. Transactions follow the ACID properties to ensure data integrity and reliability.</li>
</ol>



<h3 class="wp-block-heading">Basic Workflow of MySQL</h3>



<p class="wp-block-paragraph">The basic workflow of MySQL involves several steps from receiving the query to returning results to the user:</p>



<ol class="wp-block-list">
<li><strong>Client Request</strong>: A client (e.g., a web application) sends a query to the MySQL server. The query can be a request to retrieve data (SELECT), modify data (INSERT, UPDATE, DELETE), or manage the database structure (CREATE, ALTER, DROP).</li>



<li><strong>Parsing and Query Optimization</strong>: The MySQL query processor parses the SQL query to check for syntax errors. If the query is valid, the query optimizer evaluates possible execution plans and selects the most efficient one based on factors like available indexes and data distribution.</li>



<li><strong>Execution Plan</strong>: Once the query has been optimized, the execution engine executes the query according to the plan. If the query involves data retrieval, it retrieves data from the storage engine. For data modification operations, it updates the database accordingly.</li>



<li><strong>Data Retrieval</strong>: For SELECT queries, MySQL retrieves the requested data from the storage engine and returns it to the client. The query cache may be used to speed up repeated queries.</li>



<li><strong>Transaction Management</strong>: If the query is part of a transaction (e.g., an INSERT or UPDATE operation), MySQL ensures the transaction is atomic. If the transaction is successful, it is committed to the database. If there is an error, the transaction is rolled back to maintain data consistency.</li>



<li><strong>Replication (Optional)</strong>: If MySQL replication is set up, the changes made by the master server are propagated to slave servers. This ensures that data is consistent across multiple instances and helps improve performance and redundancy.</li>
</ol>



<h3 class="wp-block-heading">Step-by-Step Getting Started Guide for MySQL</h3>



<p class="wp-block-paragraph">Getting started with MySQL involves setting up the database, writing queries, and managing your data. Here’s a simple step-by-step guide to begin working with MySQL:</p>



<h4 class="wp-block-heading">Step 1: Install MySQL</h4>



<p class="wp-block-paragraph">To use MySQL, you first need to install it on your machine or server. You can download the MySQL Community Server from the <a href="https://dev.mysql.com/downloads/">official website</a>. MySQL is available for Linux, Windows, and macOS.</p>



<p class="wp-block-paragraph">For Linux, you can install MySQL using the package manager:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
sudo apt-get update
sudo apt-get install mysql-server

</pre></div>


<p class="wp-block-paragraph">For Windows and macOS, follow the installer instructions provided on the MySQL website.</p>



<h4 class="wp-block-heading">Step 2: Set Up MySQL Server</h4>



<p class="wp-block-paragraph">Once MySQL is installed, you can start the MySQL service:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
sudo service mysql start

</pre></div>


<p class="wp-block-paragraph">You can access the MySQL command line interface (CLI) by typing:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
mysql -u root -p

</pre></div>


<p class="wp-block-paragraph">This will prompt you to enter the root user’s password.</p>



<h4 class="wp-block-heading">Step 3: Create a Database</h4>



<p class="wp-block-paragraph">To begin, create a new database:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
CREATE DATABASE my_database;

</pre></div>


<p class="wp-block-paragraph">Switch to the database you just created:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
USE my_database;

</pre></div>


<h4 class="wp-block-heading">Step 4: Create Tables</h4>



<p class="wp-block-paragraph">Define the structure of your data by creating tables. For example, to create a simple <code>users</code> table:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
CREATE TABLE users (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(100),
    email VARCHAR(100),
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

</pre></div>


<h4 class="wp-block-heading">Step 5: Insert Data</h4>



<p class="wp-block-paragraph">You can now insert data into the table:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
INSERT INTO users (name, email) VALUES (&#039;Alice&#039;, &#039;alice@example.com&#039;);
INSERT INTO users (name, email) VALUES (&#039;Bob&#039;, &#039;bob@example.com&#039;);

</pre></div>


<h4 class="wp-block-heading">Step 6: Query Data</h4>



<p class="wp-block-paragraph">Retrieve data from the table using the SELECT query:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
SELECT * FROM users;

</pre></div>


<h4 class="wp-block-heading">Step 7: Update and Delete Data</h4>



<p class="wp-block-paragraph">You can modify or delete data with the UPDATE and DELETE commands:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
UPDATE users SET name = &#039;Alicia&#039; WHERE id = 1;
DELETE FROM users WHERE id = 2;

</pre></div>


<h4 class="wp-block-heading">Step 8: Manage Indexes and Performance</h4>



<p class="wp-block-paragraph">To improve query performance, you can create indexes on frequently queried columns:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
CREATE INDEX idx_email ON users (email);

</pre></div>


<h4 class="wp-block-heading">Step 9: Backup and Restore Data</h4>



<p class="wp-block-paragraph">MySQL provides tools like <code>mysqldump</code> for backing up and restoring data:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
mysqldump -u root -p my_database &amp;gt; backup.sql
mysql -u root -p my_database &amp;lt; backup.sql

</pre></div>


<h4 class="wp-block-heading">Step 10: Explore Advanced Features</h4>



<p class="wp-block-paragraph">Once you&#8217;re comfortable with basic SQL queries, explore advanced topics such as joins, transactions, triggers, and stored procedures to fully leverage MySQL’s capabilities.</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/understanding-mysql-architecture-use-cases-and-getting-started-guide/">Understanding MySQL: Architecture, Use Cases, and Getting Started Guide</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/understanding-mysql-architecture-use-cases-and-getting-started-guide/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Getting Started With SpringBoot Application</title>
		<link>https://www.scmgalaxy.com/tutorials/getting-started-with-springboot-application/</link>
					<comments>https://www.scmgalaxy.com/tutorials/getting-started-with-springboot-application/#respond</comments>
		
		<dc:creator><![CDATA[uttam.]]></dc:creator>
		<pubDate>Wed, 29 Sep 2021 11:18:17 +0000</pubDate>
				<category><![CDATA[Software Containers]]></category>
		<category><![CDATA[Applications]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[SpringBoot]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=9268</guid>

					<description><![CDATA[<p>Introduction Spring Boot is associated open-source Java-based framework wont to produce a small Service. It&#8217;s developed by the crucial Team [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/getting-started-with-springboot-application/">Getting Started With SpringBoot Application</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><strong>Introduction</strong></p>



<p class="wp-block-paragraph">Spring Boot is associated open-source Java-based framework wont to produce a small Service. It&#8217;s developed by the crucial Team and is employed to create complete and production-ready spring applications. This chapter can offer you an introduction to Spring Boot and familiarizes you with its basic ideas.</p>



<p class="wp-block-paragraph"><strong>What is Spring Boot?</strong><br>Spring Boot provides a decent platform for Java developers to develop a complete and production-grade spring application that you simply will just run. You&#8217;ll start with minimum configurations while not the requirement for a whole Spring configuration setup.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="674" height="333" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/09/re.png" alt="" class="wp-image-9288" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/09/re.png 674w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/09/re-300x148.png 300w" sizes="auto, (max-width: 674px) 100vw, 674px" /><figcaption><strong>Spring is that the most popular</strong> and innovative community for Java developers. They need to modify the method how to build enterprise applications and how to manage them. Spring Boot is their latest innovation to stay up to now with the dynamic technology desires. The first motivation behind developing Spring Boot is to simplify the method for configuring and deploying the spring applications.</figcaption></figure>



<p class="wp-block-paragraph"><strong>Why do we need Spring Boot?</strong></p>



<ul class="wp-block-list"><li>Spring Boot is a next-generation attempt to easy spring setup.</li><li>Spring Boot’s main benefit is configuring the resources based on what it finds in the classpath.</li><li>If your maven pom includes JPA dependencies and MYSQL driver, then Spring Boot can be created a persistence unit supported by MySQL. If you’ve added an internet dependency, then you may get Spring MVC organized with defaults.</li><li>When we point out defaults, Spring Boot has its own opinions. If you&#8217;re not specifying the main points, it&#8217;ll use its own default configurations. If you would like persistence, however, don’t specify anything in your pom file, then Spring Boot configures Hibernate as a JPA supplier with an HSQLDB database.</li></ul>



<p class="wp-block-paragraph"><strong>How does it work?</strong></p>



<p class="wp-block-paragraph">Some is also asking themselves however will Spring Boot has auto configurations and what will very that basically that actually mean? It really comes right down to three easy Spring Boot annotations that offer this feature:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="740" height="408" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/09/gg.png" alt="" class="wp-image-9297" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/09/gg.png 740w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/09/gg-300x165.png 300w" sizes="auto, (max-width: 740px) 100vw, 740px" /></figure>



<p class="wp-block-paragraph"><strong>@SpringBootApplication<br>@EnableAutoConfiguration<br>@ComponentScan</strong></p>



<p class="wp-block-paragraph">Between each one of these annotations, Spring Boot is able to provide default project dependencies as well as allow for defaults to be overwritten.</p>



<p class="wp-block-paragraph"><strong>@SpringBootApplication</strong> is used within the entry purpose of the application add the category it resides in has to get to the application main technique. The annotation is required and can offer every of the opposite two annotations to your Spring Boot application since the @SpringBootApplication includes each inside.</p>



<p class="wp-block-paragraph"><strong>@EnableAutoConfiguration</strong><br>The @EnableAutoConfiguration does just that it provides each of the representing classes with the Automatic Configuration capability.</p>



<p class="wp-block-paragraph"><strong>@ComponentScan</strong><br>Lastly, the @ComponentScan will at initialization scan all the beans and package declarations.</p>



<p class="wp-block-paragraph"><strong>Spring Starter Dependencies</strong><br>Not solely will Spring Boot include annotations however it conjointly uses Spring Starter Dependencies to make sure that your application starts with the proper dependencies therefore so you can and then you&#8217;ll hit the bottom running so to talk.</p>



<p class="wp-block-paragraph">Many times, as an application grows larger it is laborious to properly set up project dependencies, the Spring Boot Starter plugins can help facilitate dependency management. an example of a spring starter dependency is that the Spring Boot Starter internet dependency.</p>



<p class="wp-block-paragraph">That will be used so your application can have Rest Endpoints written into your application. Overall, they assist contour the event of those applications so a team can begin from an additional advanced purpose therefore fewer holes are going to be conferred particularly with larger applications.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="536" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/09/0429_Caching_in_Spring_Lina_Newsletter-d04fa2d1794448f25477dbc25e99ab60-1024x536.png" alt="" class="wp-image-9294" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/09/0429_Caching_in_Spring_Lina_Newsletter-d04fa2d1794448f25477dbc25e99ab60-1024x536.png 1024w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/09/0429_Caching_in_Spring_Lina_Newsletter-d04fa2d1794448f25477dbc25e99ab60-300x157.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/09/0429_Caching_in_Spring_Lina_Newsletter-d04fa2d1794448f25477dbc25e99ab60-768x402.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/09/0429_Caching_in_Spring_Lina_Newsletter-d04fa2d1794448f25477dbc25e99ab60-1536x804.png 1536w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/09/0429_Caching_in_Spring_Lina_Newsletter-d04fa2d1794448f25477dbc25e99ab60.png 1720w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph"><strong>Spring Boot Features</strong></p>



<p class="wp-block-paragraph"><strong>Web Development<br></strong>It is a well-suited Spring module for internet application development. we are able to simply produce a self-contained HTTP server using embedded tomcat, Jetty, or Undertow. we are able to use the spring-boot-starter-web module to start out and running applications quickly.</p>



<p class="wp-block-paragraph"><strong>SpringApplication</strong><br>It is a class that provides a convenient way to bootstrap a Spring application which can be started from the main method. You can call start your application just by calling a static run() method.</p>



<p class="wp-block-paragraph"><strong>Application Events and Listeners</strong><br>Spring Boot uses events to handle a variety of tasks. It allows us to create factories file that is used to add listeners. we can refer to it by using the ApplicationListener key.</p>



<p class="wp-block-paragraph"><strong>Admin Support</strong><br>Spring Boot provides the facility to modify admin-related features for the appliance. It&#8217;s wont to access and manage applications remotely. We will modify it by simply exploiting the spring application admin-enabled property.</p>



<p class="wp-block-paragraph"><strong>Externalized Configuration</strong><br>Spring Boot permits us to externalize our configuration so we will work with a similar application in several environments. The application uses YAML files to externalize configuration.</p>



<p class="wp-block-paragraph"><strong>Properties Files</strong><br>Spring Boot provides a rich set of Application Properties. So, we are able to use that within the properties file of our project. The properties file is used to line properties like server-port = 8082 and lots of others. It helps to arrange application properties.</p>



<p class="wp-block-paragraph"><strong>YAML Support</strong><br>It provides a convenient way for specifying hierarchical configuration. It is a superset of JSON. The SpringApplication class automatically supports YAML. It is a successful alternative to properties.</p>



<p class="wp-block-paragraph"><strong>Type-safe Configuration</strong><br>A strong type-safe configuration is provided to manipulate and validate the configuration of the application. Application configuration is usually an important task that ought to be type-safe. We are able to conjointly use annotation provided by this library.</p>



<p class="wp-block-paragraph"><strong>Logging</strong><br>Spring Boot uses Common logging for all internal logging. Logging dependencies are managed by default. We must always not modification logging dependencies if there&#8217;s no needed customization is required.</p>



<p class="wp-block-paragraph"><strong>Security</strong><br>Spring Boot applications are spring bases net applications. So, it&#8217;s secure by default with basic authentication on all HTTP endpoints. A rich set of Endpoints are obtainable for developing a secure Spring Boot application.</p>



<p class="wp-block-paragraph"><strong>Spring Boot Benefits</strong></p>



<ul class="wp-block-list"><li>Application monitoring</li><li>Auto-Configurable</li><li>Caching providers</li><li>Application configurations flexibility</li></ul>



<p class="wp-block-paragraph"><strong>Responsibilities of SpringBoot</strong></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="726" height="368" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/09/e.png" alt="" class="wp-image-9292" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/09/e.png 726w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/09/e-300x152.png 300w" sizes="auto, (max-width: 726px) 100vw, 726px" /></figure>



<p class="wp-block-paragraph">Designs, codes or configures, tests, debugs, deploys, documents and maintains web service applications using a variety of software development toolkits, testing/verification applications, and other tools while adhering to specific development best practices and quality standards.</p>



<p class="wp-block-paragraph"><strong>Advantages of Spring Boot</strong></p>



<ul class="wp-block-list"><li>It creates stand-alone Spring applications that can be started using Java -jar.</li><li>It tests web applications easily with the help of different Embedded HTTP servers such as Tomcat, Jetty, etc. We don&#8217;t need to deploy WAR files.</li><li>It provides opinionated &#8216;starter&#8217; POMs to simplify our Maven configuration.</li><li>It provides production-ready features such as metrics, health checks, and externalized configuration.</li><li>There is no requirement for XML configuration.</li><li>It offers a CLI tool for developing and testing the Spring Boot application.</li><li>It offers a number of plug-ins.</li><li>It also minimizes writing multiple boilerplate codes (the code that has to be included in many places with little or no alteration), XML configuration, and annotations.</li><li>It increases productivity and reduces development time.</li></ul>



<p class="wp-block-paragraph"><strong>The primary roles of Spring-Boot:</strong></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="793" height="397" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/09/Spring_Security_Java_Configuration-793x397-1.png" alt="" class="wp-image-9293" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/09/Spring_Security_Java_Configuration-793x397-1.png 793w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/09/Spring_Security_Java_Configuration-793x397-1-300x150.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/09/Spring_Security_Java_Configuration-793x397-1-768x384.png 768w" sizes="auto, (max-width: 793px) 100vw, 793px" /></figure>



<ul class="wp-block-list"><li>To provide a bunch of non-functional features/solutions that are very much common to large-scale projects (e.g. embedded servers, security, metrics, health checks, externalized configuration).</li><li>To provide a radically faster and widely accessible getting started development experience for all Spring development. Since the spring community has evolved so big, it is time to re-invent the way how spring applications are deployed in a much quicker turnaround time.</li><li>To be get started so quickly using the default values which are supported out of the box in the Spring Boot configurations.</li></ul>



<p class="wp-block-paragraph"><strong>Scope of SpringBoot</strong></p>



<p class="wp-block-paragraph">Scopes a single bean definition to any range of object instances. Scopes a single bean definition to the lifecycle of one HTTP request; that&#8217;s every and each HTTP request can have its own instance of a bean created off the rear of a single bean definition.</p>



<p class="wp-block-paragraph"><strong>Conclusion</strong></p>



<p class="wp-block-paragraph">I hope this article has provided the basics of Spring Boot Applications. Keep visiting this page for my update on the Spring Boot releases and a list of features in each release. I hope this information provides enough details regarding Spring Boot. This page would be often updated and maintained with the newest information regarding the Spring Boot Application. If you&#8217;re searching for any specific information, please write it within the comments section.</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/getting-started-with-springboot-application/">Getting Started With SpringBoot Application</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/getting-started-with-springboot-application/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Everything you need to know about Grafana</title>
		<link>https://www.scmgalaxy.com/tutorials/everything-you-need-to-know-about-grafana/</link>
					<comments>https://www.scmgalaxy.com/tutorials/everything-you-need-to-know-about-grafana/#respond</comments>
		
		<dc:creator><![CDATA[uttam.]]></dc:creator>
		<pubDate>Sat, 28 Aug 2021 08:45:50 +0000</pubDate>
				<category><![CDATA[Grafana]]></category>
		<category><![CDATA[Analytics]]></category>
		<category><![CDATA[Developers]]></category>
		<category><![CDATA[DevOpsschool]]></category>
		<category><![CDATA[mysql]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=8437</guid>

					<description><![CDATA[<p>What is Grafana? Grafana is multi-platform open-source analytics and interactive visualization internet application. It provides charts, graphs, and alerts for [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/everything-you-need-to-know-about-grafana/">Everything you need to know about Grafana</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><strong>What is Grafana?</strong></p>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/what-is-grafana-featured.jpg" alt="" class="wp-image-8438" width="582" height="317" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/what-is-grafana-featured.jpg 751w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/what-is-grafana-featured-300x163.jpg 300w" sizes="auto, (max-width: 582px) 100vw, 582px" /></figure>



<p class="wp-block-paragraph">Grafana is multi-platform open-source analytics and interactive visualization internet application. It provides charts, graphs, and alerts for the online once connected to supported knowledge sources.</p>



<p class="wp-block-paragraph"><strong>Why is Grafana important?</strong></p>



<p class="wp-block-paragraph">Grafana shows groups and corporations what their users very do, not simply what they are saying they are doing. These square measures are called discovered behaviors, and they are extremely telling. Users aren’t terribly adept at predicting their own futures and having analytics permits technical school groups to dig deeper than human-error-prone surveys and watching.</p>



<p class="wp-block-paragraph"><strong>How does Grafana work?</strong></p>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/grafana-high-availability.png" alt="" class="wp-image-8442" width="590" height="251" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/grafana-high-availability.png 800w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/grafana-high-availability-300x128.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/grafana-high-availability-768x326.png 768w" sizes="auto, (max-width: 590px) 100vw, 590px" /></figure>



<p class="wp-block-paragraph">A Grafana dashboard supports multiple panels in a passing single grid, you may visualize results from multiple data sources at an equivalent time. It&#8217;s a strong open source analytical and visual image tool that consists of multiple individual panels organized in an exceeding grid.</p>



<p class="wp-block-paragraph"><strong>Benefits of Grafana</strong>:</p>



<ul class="wp-block-list"><li>Grafana Cloud Traces.</li><li>Grafana Cloud Metrics.</li><li>Superfast Prometheus- and Grefait- compatible backend.</li><li>Grafana Cloud Dashboards. Dedicated Grafana front-end with enhanced reporting, security, management, and more.</li><li>Grafana Cloud Logs. Based on Grafana Loki, extreme scale, efficiency, and speed.</li></ul>



<p class="wp-block-paragraph"><strong>Where is Grafana used?</strong></p>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/1_kOloPN8jTFklD4sGlnduFQ-2-1024x639.jpeg" alt="" class="wp-image-8444" width="597" height="372" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/1_kOloPN8jTFklD4sGlnduFQ-2-1024x639.jpeg 1024w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/1_kOloPN8jTFklD4sGlnduFQ-2-300x187.jpeg 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/1_kOloPN8jTFklD4sGlnduFQ-2-768x479.jpeg 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/1_kOloPN8jTFklD4sGlnduFQ-2-1536x958.jpeg 1536w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/1_kOloPN8jTFklD4sGlnduFQ-2.jpeg 1920w" sizes="auto, (max-width: 597px) 100vw, 597px" /></figure>



<p class="wp-block-paragraph">Companies use Grafana to observe their infrastructure and log analytics, preponderantly to enhance their operational potency. Dashboards build trailing users and events straightforward as a result of it automates the gathering, management, and viewing of knowledge.</p>



<p class="wp-block-paragraph"><strong>What features does Grafana provide?</strong></p>



<p class="wp-block-paragraph">The tools that groups really used to uncover insights vary from organization to organization. The following area unit the foremost common (and useful) choices they might expect of data analytics/the visual image tools like Grafana.</p>



<p class="wp-block-paragraph">Common Grafana features:</p>



<ul class="wp-block-list"><li>Visualize: Grafana has a plethora of visualization options to help you understand your data from graphs to histograms, you have it all.</li><li>Alerts: Grafana lets you define thresholds visually, and get notified via Slack, PagerDuty, and more</li><li>Unify: You can bring your data together to get better context. Grafana supports dozens of databases, natively.</li><li>Open-Source: It’s completely open-source. You can use Grafana Cloud, or easily install it on any platform.</li><li>Explore Logs: Using label filters you can quickly filter and search through the laundry list of logs.</li><li>Display dashboards: Visualize data with templated or custom reports. Create and share reports.</li><li>Create and Share reports: Create and share reports with your customers and stakeholders. This feature is not available in the open-source version.</li></ul>



<p class="wp-block-paragraph"><strong>Why do companies use Grafana?</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="580" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/infra-1024x580.png" alt="" class="wp-image-8440" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/infra-1024x580.png 1024w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/infra-300x170.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/infra-768x435.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/infra.png 1500w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">Companies use Grafana to watch their infrastructure and log analytics, preponderantly to boost their operational potency. Dashboards build chase users and events straightforward as a result of it automates the gathering, management, and viewing of knowledge. Product leaders, security analysts, and developers use this knowledge to guide their selections. Studies show that corporations that consider information analytics and mental image tools like the Grafana the area unit are way more profitable than their peers.</p>



<p class="wp-block-paragraph"><strong>Learning Objectives</strong></p>



<ul class="wp-block-list"><li>Explore metrics and logs</li><li>Build dashboards</li><li>Annotate dashboards</li><li>Set up alerts</li></ul>



<p class="wp-block-paragraph"><strong>Intended Audience</strong></p>



<p class="wp-block-paragraph">Centralize the analysis, visualization, and alerting for all of your data with Grafana. Install, administer, and maintain your own instance</p>



<p class="wp-block-paragraph"><strong>Prerequisites</strong></p>



<p class="wp-block-paragraph">Grafana requires a database to store its configuration data, such as users, data sources, and dashboards…</p>



<ul class="wp-block-list"><li>MySQL.</li><li>PostgreSQL</li><li>SQLite.</li><li>Supported databases</li></ul>



<p class="wp-block-paragraph"><strong>Conclusion</strong></p>



<p class="wp-block-paragraph">Grafana permits groups across Stack Overflow to quickly and simply build the custom self-service dashboards for what is vital to them, regardless of wherever the info lives or that info it&#8217;s holding on to.</p>



<p class="wp-block-paragraph">If you want to learn relating to this course, I would suggest you visit <a href="https://www.devopsschool.com/certification/prometheus-with-grafana.html" target="_blank" rel="noreferrer noopener">DevOpsSchool.com</a>.</p>



<p class="wp-block-paragraph">Thank you!</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/everything-you-need-to-know-about-grafana/">Everything you need to know about Grafana</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/everything-you-need-to-know-about-grafana/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>MySql queries:</title>
		<link>https://www.scmgalaxy.com/tutorials/mysql-queries/</link>
					<comments>https://www.scmgalaxy.com/tutorials/mysql-queries/#respond</comments>
		
		<dc:creator><![CDATA[Joydeep M]]></dc:creator>
		<pubDate>Fri, 02 Apr 2021 12:30:57 +0000</pubDate>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[insert]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[queries]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=5790</guid>

					<description><![CDATA[<p>Inserting data into a existing table: Syntax without column names specified: Example: In the example we have inserted the data [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/mysql-queries/">MySql queries:</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><strong>Inserting data into a existing table:</strong></p>



<p class="wp-block-paragraph">Syntax without column names specified:</p>



<pre class="wp-block-code"><code>INSERT INTO table_name VALUES ('value1','value2');</code></pre>



<p class="wp-block-paragraph">Example:</p>



<script src="https://gist.github.com/Joydeep-cotocus/e7cfffffea5ffab8fde1dc9144ea6dbc.js"></script>



<p class="wp-block-paragraph">In the example we have inserted the data in a customer_table where we have 4 columns with name cust_id, first_name, last_name, age and we have inserted the data in the columns with this command.</p>



<p class="wp-block-paragraph">Syntax without column names specified:</p>



<pre class="wp-block-code"><code>INSERT INTO table_name ('column1','column2') VALUES ('value1','value2');</code></pre>



<p class="wp-block-paragraph">Example:</p>



<script src="https://gist.github.com/Joydeep-cotocus/2fad1e79c63ad00da25c866ea8bf0ec7.js"></script>



<p class="wp-block-paragraph">In this example we have inserted the data in three columns excluding the last_name column, by doing this it will store the information in all the columns and will show NULL in the last_name.</p>



<p class="wp-block-paragraph"><strong>Inserting data in multiple rows:</strong></p>



<script src="https://gist.github.com/Joydeep-cotocus/6f6678e2ac3440fe59b546a0dcddb297.js"></script>



<ul class="wp-block-list"><li>To &#8216;SELECT&#8217; a statement in a table:</li></ul>



<pre class="wp-block-code"><code>Select column_name from table_name;</code></pre>



<p class="wp-block-paragraph">Following command will show the data stored in the column_name column in the database.</p>



<ul class="wp-block-list"><li>To use &#8216;WHERE&#8217; command in a table:</li></ul>



<pre class="wp-block-code"><code>Select column_name from table_name Where (column_name = condition);</code></pre>



<p class="wp-block-paragraph">For example:</p>



<p class="wp-block-paragraph">We have a table with Customers name , age and email given and we need to see only the data of customer whose age is greater than 25.</p>



<pre class="wp-block-code"><code>Select * from customer_table where age>25;</code></pre>



<p class="wp-block-paragraph">This command will show the data of the customers whose age is greater than 25.</p>



<ul class="wp-block-list"><li>To use logical operators in the query:</li></ul>



<pre class="wp-block-code"><code>Select column_name from table_name Where (column_name = condition) AND (column_name = condition) OR (column_name = condition);</code></pre>



<ul class="wp-block-list"><li>To update data in the table:</li></ul>



<pre class="wp-block-code"><code>UPDATE table_name SET column_name='abc' WHERE condition(column);</code></pre>



<p class="wp-block-paragraph">For example to update the last name of a customer:</p>



<pre class="wp-block-code"><code>UPDATE customer_table SET Last_name='John' WHERE cust_id=5</code></pre>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/mysql-queries/">MySql queries:</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/mysql-queries/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Creating a Table using MySql queries:</title>
		<link>https://www.scmgalaxy.com/tutorials/creating-a-table-using-my-sql-queries/</link>
					<comments>https://www.scmgalaxy.com/tutorials/creating-a-table-using-my-sql-queries/#respond</comments>
		
		<dc:creator><![CDATA[Joydeep M]]></dc:creator>
		<pubDate>Thu, 01 Apr 2021 12:37:37 +0000</pubDate>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[query]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=5785</guid>

					<description><![CDATA[<p>In this we will learn how we can create tables in the database using sql queries. As we know it [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/creating-a-table-using-my-sql-queries/">Creating a Table using MySql queries:</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">In this we will learn how we can create tables in the database using sql queries. As we know it becomes quite complicated to make the tables manually in the database. To ease the process we can follow the steps to make tables using my sql queries.</p>



<p class="wp-block-paragraph"><strong>Syntax:</strong></p>



<pre class="wp-block-code"><code>CREATE TABLE table_name (
    column1 column1 datatype column1 constraint,
    column2 column2 datatype column2 constraint,
    column3 column3 datatype column3 constraint,
   ....
);</code></pre>



<p class="wp-block-paragraph"><strong>Constraints:</strong></p>



<ul class="wp-block-list"><li><strong>NOT NULL CONSTRAINT</strong> &#8211; Ensures that a column cannot have a null value.</li><li><strong>DEFAULT CONSTRAINT</strong> &#8211; Provides a default value for a column when none is specified.</li><li><strong>UNIQUE CONSTRAINT</strong> &#8211; Ensures that all value in a column are different.</li><li><strong>CHECK CONSTRAINT </strong>&#8211; Make sure all values in a column satisfy certian criteria.</li><li><strong>PRIMARY_KEY CONSTRAINT </strong>&#8211; Used to uniquely identify a row in a table.</li><li><strong>FOREIGN_KEY CONSTRAINT </strong>&#8211; Used to ensure referential integrity of the data.</li></ul>



<p class="wp-block-paragraph"><strong>Keys:</strong></p>



<ul class="wp-block-list"><li>A primary key is used to uniquely identify each row in a table.</li><li>A primary key can consists of one or more columns on a table.</li><li>When multiple columns are used as primary key, it is called as Composite key.</li><li>A foreign key is a column (or columns) that references a column (most often primary key) of other table.</li><li>The purpose of foreign key is to referential integrity of the data.</li></ul>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="904" height="362" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/04/Untitled-1.jpg" alt="" class="wp-image-5786" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/04/Untitled-1.jpg 904w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/04/Untitled-1-300x120.jpg 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/04/Untitled-1-768x308.jpg 768w" sizes="auto, (max-width: 904px) 100vw, 904px" /></figure>



<p class="wp-block-paragraph">As shown in the above picture, Cust_ID is the foreign key for order table whereas it is primary key for in the Customer table that means the value of Cust_ID will not change in either of the table.</p>



<p class="wp-block-paragraph">For example we will create a table named as customer_table inside the &#8216;test&#8217; database:</p>



<script src="https://gist.github.com/Joydeep-cotocus/f9cd72fcba465481909e066d538a3eb2.js"></script>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/creating-a-table-using-my-sql-queries/">Creating a Table using MySql queries:</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/creating-a-table-using-my-sql-queries/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>MySQL Error 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)</title>
		<link>https://www.scmgalaxy.com/tutorials/mysql-error-1045-28000-access-denied-for-user-rootlocalhost-using-password-yes/</link>
					<comments>https://www.scmgalaxy.com/tutorials/mysql-error-1045-28000-access-denied-for-user-rootlocalhost-using-password-yes/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Sat, 09 Dec 2017 12:24:56 +0000</pubDate>
				<category><![CDATA[Application Server]]></category>
		<category><![CDATA[mysql]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=2770</guid>

					<description><![CDATA[<p>rajeshkumar created the topic: MySQL ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES) MySQL ERROR 1045 (28000): [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/mysql-error-1045-28000-access-denied-for-user-rootlocalhost-using-password-yes/">MySQL Error 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>rajeshkumar created the topic: MySQL ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)</strong></p>
<p>MySQL ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)</p>
<p>root@server [~]# mysql</p>
<p>ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)<br />
root@server [~]#</p>
<p>root@server [/var/lib/mysql/mysql]# ls -lhd /var/lib/mysql<br />
drwxr-x–x 179 mysql mysql 12K Aug 25 01:44 /var/lib/mysql/</p>
<p>root@server [/var/lib/mysql/mysql]# chmod 711 /var/lib/mysql/mysql</p>
<p>root@server1 [/var/lib/mysql/mysql]# ls -lhd /var/lib/mysql/mysql<br />
drwx–x–x 2 mysql mysql 4.0K Aug 25 01:32 /var/lib/mysql/mysql/</p>
<p>root@server1 [/var/lib/mysql/mysql]# service mysql restart<br />
Shutting down MySQL.. [ OK ]<br />
Starting MySQL [ OK ]<br />
root@server1 [/var/lib/mysql/mysql]# mysql<br />
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1<br />
Server version: 5.0.51a-community MySQL Community Edition (GPL)Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.</p>
<p>mysql> quit</p>
<p>Bye<br />
Regards,<br />
Rajesh Kumar<br />
Twitt me @ <a href="http://twitter.com/RajeshKumarIn">twitter.com/RajeshKumarIn</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/mysql-error-1045-28000-access-denied-for-user-rootlocalhost-using-password-yes/">MySQL Error 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/mysql-error-1045-28000-access-denied-for-user-rootlocalhost-using-password-yes/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Creating file system info and put into mysql db</title>
		<link>https://www.scmgalaxy.com/tutorials/creating-file-system-info-and-put-into-mysql-db/</link>
					<comments>https://www.scmgalaxy.com/tutorials/creating-file-system-info-and-put-into-mysql-db/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Fri, 08 Dec 2017 11:21:56 +0000</pubDate>
				<category><![CDATA[Perl Script]]></category>
		<category><![CDATA[mysql]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=2474</guid>

					<description><![CDATA[<p>rajeshkumar created the topic: Creating file system info and put into mysql db Create a perl script for following task… [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/creating-file-system-info-and-put-into-mysql-db/">Creating file system info and put into mysql db</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>rajeshkumar created the topic: Creating file system info and put into mysql db</strong></p>
<p>Create a perl script for following task…<br />
1. Read the directory mentioned by users and list all the files along with their size and Create a property file which has following info of each file.</p>
<p>#	Server name	Path	File Name	date	Size<br />
1	rajesh	/perforce/server:port/root	xyz.txt	today	10KB</p>
<p>2. Insert this data into mysql Db in table in same fashion as it is in property file</p>
<p>Regards,<br />
Rajesh Kumar<br />
Twitt me @ <a href="http://twitter.com/RajeshKumarIn">twitter.com/RajeshKumarIn</a></p>
<p><strong>rajeshkumar replied the topic: Re: Creating file system info and put into mysql db</strong></p>
<p>Hi Tushar,</p>
<p>I could make it for reading directory and displaying files in such a given format&#8230;</p>
<p>My example program is</p>
<p>$DIR = &#8220;/home/rajesh&#8221;;</p>
<p>@dirlist = `ls -l $DIR | tr -s &#8221; &#8221; &#8221; &#8220;| cut -d &#8221; &#8221; -f5,9`;<br />
foreach (@dirlist)<br />
{<br />
print &#8220;$_ \n&#8221;;<br />
}</p>
<p>Regards,<br />
Rajesh Kumar<br />
Twitt me @ <a href="http://twitter.com/RajeshKumarIn">twitter.com/RajeshKumarIn</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/creating-file-system-info-and-put-into-mysql-db/">Creating file system info and put into mysql db</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/creating-file-system-info-and-put-into-mysql-db/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>SQL Injection: How to check or test for vulnerabilities</title>
		<link>https://www.scmgalaxy.com/tutorials/sqj-injection/</link>
					<comments>https://www.scmgalaxy.com/tutorials/sqj-injection/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Thu, 22 Oct 2015 15:38:05 +0000</pubDate>
				<category><![CDATA[Testing Tools]]></category>
		<category><![CDATA[Blind Injection]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[SQL injection]]></category>
		<category><![CDATA[Tautology Based Injection]]></category>
		<category><![CDATA[Test]]></category>
		<category><![CDATA[vulnerabilities]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2015/10/22/sqj-injection/</guid>

					<description><![CDATA[<p>SQJ Injection There are a number of ways of testing an application for vulnerabilities such as SQL Injection. The tests [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/sqj-injection/">SQL Injection: How to check or test for vulnerabilities</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3090 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/10/sql-injection.png" alt="sql-injection" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/10/sql-injection.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/10/sql-injection-300x200.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></div>
<div><strong>SQJ Injection</strong></div>
<div>There are a number of ways of testing an application for vulnerabilities such as SQL Injection. The tests break down into three different methodologies:</div>
<div></div>
<div><strong>Blind Injection:</strong></div>
<div></div>
<div>MySQL example:</div>
<div></div>
<div>http://localhost/test.php?id=sleep(30)</div>
<div>If this SQL statement is interpreted by the database then it will take 30 seconds for the page to load.</div>
<div></div>
<div><strong>Error Messages:</strong></div>
<div></div>
<div>http://localhost/test.php?id='&#8221;</div>
<div>If error reporting is enabled and this request is vulnerable to sql injection then the following error will be produced:</div>
<div></div>
<div>You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#8216;&#8221;&#8216; at line 5</div>
<div></div>
<div><strong>Tautology Based Injection:</strong></div>
<div></div>
<div>http://localhost/test.php?username=&#8217; or 1=1 /*&amp;password=1</div>
<div>In this case supplying a Tautology, or a statement that is always true provides a predictable result. In this case the predictable result would be logging in the attacker with the first user in the database, which is commonly the administrator.</div>
<div></div>
<div>There are tools that automate the use of the methods above to detect SQL Injection in a web application. There are free and open source tools such as Wapiti and Skipfish that do this.</div>
<div></div>
<div><strong>More &#8211;</strong></div>
<div></div>
<div><a href="http://stackoverflow.com/questions/10281349/testing-if-a-site-is-vulnerable-to-sql-injection" target="_blank" rel="noopener">http://stackoverflow.com/questions/10281349/testing-if-a-site-is-vulnerable-to-sql-injection</a></div>
<div></div>
<div><a href="http://thecybersaviours.com/how-to-find-out-if-a-website-is-vulnerable-to-sql-injection" target="_blank" rel="noopener">http://thecybersaviours.com/how-to-find-out-if-a-website-is-vulnerable-to-sql-injection</a></div>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/sqj-injection/">SQL Injection: How to check or test for vulnerabilities</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/sqj-injection/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>MySQL Basic Troubleshooting Guide &#124; MySQL common Issues</title>
		<link>https://www.scmgalaxy.com/tutorials/mysql-basic-troubleshooting-guide/</link>
					<comments>https://www.scmgalaxy.com/tutorials/mysql-basic-troubleshooting-guide/#comments</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Wed, 15 May 2013 13:39:01 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[BuildForge Server]]></category>
		<category><![CDATA[COmmon Problems in MysQL]]></category>
		<category><![CDATA[How]]></category>
		<category><![CDATA[issues.]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[MySQL Basic Issues]]></category>
		<category><![CDATA[MySQL Basic Problems]]></category>
		<category><![CDATA[MySQL Basic Troubleshooting]]></category>
		<category><![CDATA[MySQL common Issues]]></category>
		<category><![CDATA[MySQL Guide]]></category>
		<category><![CDATA[MySQL Issues]]></category>
		<category><![CDATA[MySQL Problems]]></category>
		<category><![CDATA[MySQL Troubleshooting]]></category>
		<category><![CDATA[MySQL Troubleshooting Guide]]></category>
		<category><![CDATA[MySQL Tutorial]]></category>
		<category><![CDATA[Troubleshoot MySQL]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2013/05/15/mysql-basic-troubleshooting-guide/</guid>

					<description><![CDATA[<p>PLEASE NOTE: I am currently reviewing this Article. How to check the mysql file location: &#62; which mysql &#62; locate [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/mysql-basic-troubleshooting-guide/">MySQL Basic Troubleshooting Guide | MySQL common Issues</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3783 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2013/05/mysql-troubleshooting.png" alt="mysql-troubleshooting" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2013/05/mysql-troubleshooting.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2013/05/mysql-troubleshooting-300x200.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></p>
<p>PLEASE NOTE: I am currently reviewing this Article.</p>
<p><strong>How to check the mysql file location:</strong><br />
&gt; which mysql<br />
&gt; locate mysql</p>
<p><strong>Check mysqld process is started or not?</strong><br />
&gt; service mysqld status<br />
&gt; “mysqld is stopped” – Means mysqld is not running<br />
&gt; “mysqld: unrecognized service” – Means mysqld is not set in service. This can be register using chkconfig under /etc/init.d.<br />
&gt; ps -eaf | grep mysqld</p>
<p><strong>To check if port 3306 is bind with mysqld or another program.</strong><br />
&gt; lsof -i TCP:3306<br />
&gt; netstat -lp | grep 3306<br />
&gt; netstat -tap | grep mysql<br />
&gt; ps -aux | grep mysql<br />
&gt; netstat -a -t &#8211; to show only tcp ports</p>
<p>Note: &#8211; if you could not found 3306 is listening with mysqld, then it must not be running or running with another ports. To find this, refer my.cnf and pid-file</p>
<p><strong>How to Stop mysqld?</strong><br />
&gt; /etc/init.d/mysqld stop<br />
&gt; kill &lt;pid&gt;<br />
&gt; /sbin/service mysqld start/stop/restart</p>
<p>If you have problems starting the server, here are some things to try:</p>
<p><strong>Check the error log to see why the server does not start.</strong><br />
The Location of error log file can be found in my.cnf or my.ini(windows). please refer below to know more about my.cnf file. The log file can be specified also in mysqld service resided<br />
under /etc/init.d/</p>
<p><strong>Make sure that the server knows where to find the data directory.</strong><br />
Make sure my.cnf file is set with &#8220;datadir&#8221; and its required ownership and permission. Make sure that the server can access the data directory. The ownership and permissions of the data directory and its contents must be set such that the server can read and modify them.</p>
<p><strong>Verify that the network interfaces the server wants to use are available. If the server starts but you cannot connect to it, you should make sure that you have an entry in /etc/hosts that<br />
looks like this:</strong><br />
127.0.0.1 localhost</p>
<p><strong>If mysqld is running, To find all the variable set using </strong><br />
&gt; mysqladmin -h hostname -p variables</p>
<p><strong>Issues 1:</strong><br />
Can&#8217;t start server: Bind on TCP/IP port: Address already in use<br />
Can&#8217;t start server: Bind on unix socket&#8230;<br />
<strong>Solution:</strong><br />
Use ps to determine whether you have another mysqld server running. If so, shut down the server before starting mysqld again.</p>
<p><strong>Issues 2:</strong><br />
mysqld will not start<br />
Can&#8217;t start server: Bind on TCP/IP port: Address already in use<br />
Do you already have another mysqld server running on port: 3306 ?<br />
<strong>Solution:</strong><br />
This may be due to 3306 port is being used or Disk Space issues. You can look up on the log file.</p>
<p><strong>Recovering a crashed MySQL server if the system itself or just the MySQL daemon corrupted table files</strong></p>
<p>You’ll see this when checking the /var/log/syslog, as the MySQL daemon checks tables during its startup.</p>
<p>Apr 17 13:54:44 live1 mysqld[2613]: 090417 13:54:44 [ERROR]<br />
/usr/sbin/mysqld: Table &#8216;./database1/table1&#8217; is marked as<br />
crashed and should be repaired</p>
<p>In this situation, Database and tables need to be repaired.</p>
<p>&gt; mysql -u root -p<br />
mysql&gt; REPAIR TABLE database1.table1;</p>
<p>This works, but there is a better way: First, using OPTIMIZE in combination with REPAIR is suggested and there is a command line tool only for REPAIR jobs. Consider this call:<br />
&gt; mysqlcheck -u username -p -o &#8211;auto-repair -v &#8211;optimize database_name</p>
<p>Using “mysqlcheck” is, that it can also be run against all databases in one run<br />
&gt; mysqlcheck -u root -p &#8211;auto-repair &#8211;check &#8211;optimize &#8211;all-databases</p>
<p>Recreating databases and tables the right way<br />
mysql&gt; show create database database1;</p>
<p><strong>How to find location of my.cnf (or my.ini on Windows)?</strong></p>
<p>Default options are read from the following files in the given order:<br />
/etc/my.cnf<br />
/etc/mysql/my.cnf<br />
/usr/etc/my.cnf<br />
~/.my.cnf</p>
<p>Or, on Windows:<br />
Default options are read from the following files in the given order:<br />
C:\Windows\my.ini<br />
C:\Windows\my.cnf<br />
C:\my.ini<br />
C:\my.cnf<br />
C:\Program Files\MySQL\MySQL Server 5.5\my.ini<br />
C:\Program Files\MySQL\MySQL Server 5.5\my.cnf</p>
<p><strong>This command also help you in linux to find my.conf file location&#8230;</strong><br />
&gt; strace mysql &#8220;;&#8221; 2&gt;&amp;1 | grep cnf</p>
<p><strong>Another Option to use following commands&#8230;</strong><br />
&gt; whereis my.cnf<br />
&gt; locate my.cnf<br />
&gt; find &#8211; -name my.cnf</p>
<p><strong>my.cnf will contain following&#8230;</strong><br />
datadir &#8211; The path to the MySQL data directory.<br />
tmpdir<br />
default-character-set<br />
default-storage-engine<br />
innodb_data_home_dir<br />
log-error- The location of log file.<br />
pid-file &#8211; The path name of the file in which the server should write its process ID.</p>
<p><strong>MySQL Performance Troubleshooting</strong><br />
There are three main utilities I’ll run to in a situation like this:</p>
<p>top<br />
First I’m going to use top to see if anything is hogging CPU on the machine. If there are non-mysql processes using a substantial percentage of the CPU cores, I’m going to want to havea look at what that is and see about limiting its use or moving it a dedicated server. If I see mysqld using up a lot of CPU, I know it’s working hard and will have to drill into what’shappening inside of MySQL (maybe some poorly written queries). If nothing is apparently chewing up the CPU time, I know that the problem is likely elsewhere.</p>
<p>vmstat 5<br />
I generally run this for at least two or three minutes to get a sense of what the CPU and memory use are like. I’m also watching to see how much time the CPU is stalled waiting for I/Orequests. Doing this for several minutes will make the occasional spikes really stand out and also allow for more time to catch those cron jobs that fire up every few minutes.</p>
<p>iostat -x 5 | grep sdb<br />
I’m going to run it with a short interval (5 or 10 seconds) and do so for several minutes. I’ll likely filter the output so that I only see the output for the most active disk or array (the onewhere all of MySQL’s data lives).</p>
<p>slow queries<br />
To find out about slow queries I’m going hope that the slow query log is enabled and the server has a sane long_query_time. But even the default of 10 seconds is helpful in truly badsituations.</p>
<p><strong>MySQL’s error log</strong><br />
I’ll also want to glance through MySQL’s error log to make sure nothing bad-looking has started to appear. To Find a error log file location, refer my.cnf file &#8220;log-error&#8221;.</p>
<p><strong>Network issues</strong><br />
telnet your_host_name tcp_ip_port_number.</p>
<p><strong>mysqladmin : </strong><br />
mysqladmin is a client for performing administrative operations. You can use it to check the server&#8217;s configuration and current status, to create and drop databases, and more.</p>
<p>mysqladmin -h hostname -p &lt;command_as_follows&gt;</p>
<p>&#8211;help, -? &#8211; Display a help message and exit.<br />
refresh &#8211; Flush all tables and close and open log files.<br />
variables &#8211; Display the server system variables and their values.<br />
flush-logs &#8211; Flush all logs.<br />
flush-privileges &#8211; Reload the grant tables (same as reload).<br />
flush-status &#8211; Clear status variables.<br />
password new-password &#8211; Set a new password. This changes the password to new-password for the account that you use with mysqladmin for connecting to the server.<br />
ping &#8211; Check whether the server is available<br />
processlist &#8211; Show a list of active server threads.<br />
shutdown &#8211; Stop the server.<br />
status &#8211; Display a short server status message.<br />
Uptime &#8211; The number of seconds the MySQL server has been running.<br />
Slow queries &#8211; The number of queries that have taken more than long_query_time seconds<br />
Open tables &#8211; The number of tables that currently are open.</p>
<p><strong>Reference</strong><br />
<a href="http://dev.mysql.com/doc/refman/5.5/en/mysqladmin.html" target="_blank" rel="noopener">http://dev.mysql.com/doc/refman/5.5/en/mysqladmin.html</a><br />
<a href="http://dev.mysql.com/doc/refman/5.1/en/slow-query-log.html" target="_blank" rel="noopener">http://dev.mysql.com/doc/refman/5.1/en/slow-query-log.html</a><br />
<a href="http://www.linux-mag.com/id/7473/" target="_blank" rel="noopener">http://www.linux-mag.com/id/7473/</a><br />
<a href="http://dev.mysql.com/doc/refman/5.1/en/starting-server.html" target="_blank" rel="noopener">http://dev.mysql.com/doc/refman/5.1/en/starting-server.html</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/mysql-basic-troubleshooting-guide/">MySQL Basic Troubleshooting Guide | MySQL common Issues</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/mysql-basic-troubleshooting-guide/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
