Showing entries 61 to 69
« 10 Newer Entries
Displaying posts with tag: MySQL Tutorial (reset)
MySQL DATE_ADD Function with Simple Examples

This tutorial explains MySQL DATE_ADD function which adds up a slice of time (in days/hours, e.g., 1 day or 10 days) to the given date. We’ll describe the complete date arithmetic of this method with the help of simple examples. 1. DATE_ADD() Syntax 2. DATE_ADD() with -ve Interval 3. DATE_ADD() for Invalid Date 4. DATE_ADD() for Auto Adjustment Let’s now go through each of the section one by one. MySQL DATE_ADD() Function As stated initially, DATE_ADD() is a built-in MySQL function which adds the specified no. of days to a given date. So, let’s now see the details and check

The post MySQL DATE_ADD Function with Simple Examples appeared first on Learn Programming and Software Testing.

MySQL DATE_SUB Function with Simple Examples

This tutorial explains MySQL DATE_SUB function which subtracts a slice of time (in days/hours, e.g., 1 day or 10 days) from the given date. We’ll describe the complete date arithmetic of this method with the help of simple examples. 1. DATE_SUB() Syntax 2. DATE_SUB() with -ve Interval 3. DATE_SUB() for Invalid Date 4. DATE_SUB() for Auto Adjustment Let’s now go through each of the section one by one. MySQL DATE_SUB() Function As stated initially, DATE_SUB() is a built-in MySQL function which subtracts the specified no. of days from a given date. So, let’s now see the details and check out

The post MySQL DATE_SUB Function with Simple Examples appeared first on Learn Programming and Software Testing.

MySQL FIND_IN_SET Function with Simple Examples

This tutorial explains MySQL FIND_IN_SET function which finds the position of a string within a sequence of strings separated by commas (i.e., comma-separated such as str1, str2, find_this_string,…) with examples. 1. FIND_IN_SET() Syntax 2. FIND_IN_SET Flow Diagram 3. FIND_IN_SET() Examples 4. FIND_IN_SET() Function Vs. IN operator Let’s now go through each of the section one by one. MySQL FIND_IN_SET() Function As stated initially, FIND_IN_SET() is a built-in MySQL function which returns the index of a string in a list of comma-delimited strings. So, let’s now see the details and check out how can we use it. Syntax Below is the

The post MySQL FIND_IN_SET Function with Simple Examples appeared first on Learn Programming and Software Testing.

How to Declare Variables in MySQL

This tutorial describes how to declare a variable (like user-defined, local, and system vars) in MySQL. We’ll tell you the complete syntax and provide simple examples for clarity. MySQL puts up the below three ways: 1. Declare a user-defined variable 2. Declare a local variable 3. Declare a system variable Let’s start with looking at all of them one by one. Declare Variable in MySQL There are primarily three types of variables in MySQL. And each has its specific way to provide a declaration. 1. Declare a User-defined Variable In MySQL, we can use the SET statement to declare a

The post How to Declare Variables in MySQL appeared first on Learn Programming and Software Testing.

MySQL Tutorial – Learn Step by Step

We bring you the best MySQL tutorial to learn all Basic to Advanced concepts step by step. This post covers all MySQL building blocks such as DDL, DML, DCL, and TCL. DDLs are commands to create, drop, alter, truncate, rename, comment databases, and tables. Also, DMLs are select, insert, update, delete commands to manipulate data. Moreover, you’ll also find the DCLs on this page such as grant and invoke to manage rights and permissions. After that, there are TCLs to control the transactions. So, let’s start by telling you that the father of MySQL is Michael Widenius, who named it

The post MySQL Tutorial – Learn Step by Step appeared first on Learn Programming and Software Testing.

MySQL Tutorial – Managing MySQL Server Logs: Rotate, Compress, Retain & Delete

MySQL Server generates several logs that can help you monitor the activities of the server. However, once these logs are enabled, they can grow in size and start taking up too much disk space. This is why it’s important to have an automated way of archiving and preserving MySQL log files for a certain duration, as well as deleting the old ones. In this blog post, we describe some best practices for setting up and managing MySQL error logs, general logs and slow query logs for your MySQL deployments.

Setting Up MySQL Server Logging

Let’s look at how to setup the following 3 types of logs:

Error Log

Logs all the problems encountered during starting, running, or stopping mysqld. This log can be enabled by having the following option in /etc/my.cnf file:

[Read more]
MySQL Tutorial – Understanding The Seconds Behind Master Value

In a MySQL hosting replication setup, the parameter Seconds_Behind_Master (SBM), as displayed by the SHOW SLAVE STATUS command, is commonly used as an indication of the current replication lag of the slave. In this blog post, we examine how to understand and interpret this value in various situations.

Possible Values of  Seconds Behind Master

The value of SBM, as explained in the  MySQL documentation, depends on the state of the MySQL slave in general, and the states of MySQL slave SQL_THREAD and IO_THREAD in particular. While IO_THREAD connects with the master and reads the updates, SQL_THREAD applies these updates on the slave. Let’s examine the possible values of SBM during different states of the MySQL Slave.

When SBM Value is Null

  • SBM is …
[Read more]
Quick Steps to Install MySQL on Windows 7 and Things to Do Next

MySQL is free, open source, and easily available for download. It is usually the first choice of most Web developers for learning SQL and database. Many large websites and hosting companies rely on using MySQL as their backend. Here we are outlining the simple steps to install MySQL on Windows 7. Not only does it support multiple platforms but allows quick integration with a no. of programming languages like Java, C#, and Python. In our last tutorial, we’d laid down the steps to install MySQL on Ubuntu platform. If Linux is the alternate operating system you use, then it’s worth reading this tutorial to get

The post Quick Steps to Install MySQL on Windows 7 and Things to Do Next appeared first on Learn Programming and Software Testing.

Easy Steps to Install MySQL on Ubuntu 16.04 and Debian OS

Read the step by step tutorial to install MySQL on Ubuntu 16.04 and Debian OS. Also, find steps to setup, secure, and tune MySQL for performance.

The post Easy Steps to Install MySQL on Ubuntu 16.04 and Debian OS appeared first on Learn Programming and Software Testing.

Showing entries 61 to 69
« 10 Newer Entries