Practical solutions

MySQL Howtos How-To Guides

Solve the problem. Keep building. Collection of MySQL how-to articles

Find the answer you need

Browse practical solutions, grouped by the task you're working on.

__COUNT__ entries on this page

How to Format and Store Phone Numbers in MySQLThis tutorial illustrates the handling and formatting of phone number fields in a MySQL database. The choice of the most appropriate datatypes based on database requirements is also discussed. How to Adding a Column in MySQLThis tutorial demonstrates adding a column in a MySQL database. How to Find Last Inserted ID From Tables in MySQLWe will discuss the ways for finding last inserted IDs in MySQL in spesific cases. How to Dump Remote Database in MySQLThis article introduces how to dump MySQL remote database. How to Set Timezone in MySQLIn this tutorial we will learn how to change timezone in MySQL server. How to Retrieve Data Within a Date Range in MySQLThis tutorial illustrates the method of selecting and retrieving data within a date range in MySQL using comparison operators. How to Implement Flush Privileges in MySQLThis tutorial introduces the flush privileges command in MySQL for refreshing the grants table and effecting permitted changes. How to Find Duplicate Records in a MySQL TableThis tutorial illustrates the methods of detecting and counting the number of duplicate records in a MySQL table using a combination of the Select, Distinct, and Count keywords. How to Change Column Datatype or Property in MySQLThis tutorial explains the process of changing the datatype and other attributes or constraints of an existing column in a MySQL database table. How to Copy Database in MySQLThis article introduces how to copy MySQL database. How to Export Data to an Outfile in MySQLThis article introduces how to export SQL to an outfile. How to Check if a Row Exists in the MySQL TableThis tutorial demonstrates different ways to check if a row exists in the MySQL table. It explains each method with SQL query. How to Wait for Table Metadata LockThis tutorial educates about lock and metadata lock wait. It also introduces the causes for the occurrence of metadata lock wait and provides the solution as well. How to Copy Rows in the MySQL DatabaseThis tutorial demonstrates how to copy rows in the MySQL database. It explains by copying rows within the same table as well as from one table to another. How to Skip Grant Tables in MySQLThis tutorial educates about grant tables, MySQL skip grant tables, and their uses. How to Update Primary Key in MySQL TablesThis tutorial educates about how to update primary key in MySQL tables. How to Copy Table Structures Without Copying Data in MySQLThis tutorial demonstrates how to copy table structures without copying data in MySQL. How to Use the Date_ADD() Function to Add Days and Time in MySQLThis tutorial demonstrates the use of DATE_ADD() function to add and minus days and time in MySQL. How to Show Indexes for Table or Database in MySQLThis tutorial demonstrates how we can show indexes for a table or a database in MySQL. How to Get the MySQL Command History in Windows and LinuxThis tutorial demonstrates different methods to get the history of MySQL commands in Windows and Linux. How to Fix Error: Data Is Truncated for a Column Error in MySQLThis tutorial educates about the possible reasons and solutions to get rid of an error saying MySQL data is truncated for a column. How to Install the MySQL Client in LinuxThis article introduces how to install the MySQL client in Linux. How to Cast to Decimal in MySQLThis tutorial educates about how to cast to decimal in MySQL using CAST() and CONVERT() with the DECIMAL(M,D) function. How to Compare MySQL Timestamp Dates With the Date Parameter OnlyThis tutorial demonstrates how we can compare MySQL timestamp dates with the date parameter only using the DATE(), CAST(), and CONVERT() functions.