Welcome to the MySQL Knowledge Base and Tutorial
Purge Binary log
If you have enabled binary logging for the point-in-time recovery (or using replication in your environment) option and forgot toRead More »
MySQL trim function
MySQL TRIM() function returns a string after removing all prefixes or suffixes from the given string. Syntax TRIM([{BOTH | LEADINGRead More »
MySQL RAND Function
MySQL has a RAND function that can be invoked to produce random numbers between 0 and 1: mysql> SELECT RAND(Read More »
mysql locate function
MySQL LOCATE() returns the position of the first occurrence of a string within a string. Both of these strings areRead More »
mysql limit clause
What is MySQL limit clause? The LIMIT clause is used in the SELECT statement to constrain the number of rowsRead More »
mysql length function
Description: MySQL LENGTH() returns the length of a given string. Syntax: LENGTH (str) Argument: Name Description strRead More »
mysql concat function
MySQL CONCAT function is used to concatenate two strings to form a single string. Description: MySQL CONCAT() function is usedRead More »
MySQL substring function
MySQL SUBSTRING() returns a specified number of characters from a particular position of a given string. Syntax: SUBSTRING(str, pos, len)Read More »
views changed into tables, while restoring mysql database
In the backup script the views are first created as tables which are then dropped at the end ofRead More »
mysql if function
Syntax: IF(expr,if_true_expr,if_false_expr) MySQL IF function is control flow functions that returns a value based on a condition. The IF functionRead More »
PHP MySQL Database Connection
PHP 5 and later can work with a MySQL database using: MySQLi extension (the “i” stands for improved) PDO (PHPRead More »
MySQL Index : Understanding MySQL indexing
What is Indexing? A database index is a data structure that improves the speed of operations in a table. IndexesRead More »
MySQL Database Administration - Part1
Running and Shutting down MySQL Server: First check if your MySQL server is running or not. You can use theRead More »
Creating Views in MySQL : How to create mysql views
Summary: in this tutorial, you will learn how to create views in MySQL by using the CREATE VIEW statement. Introduction to CREATE VIEW statementRead More »
mysql query log - Log all queries on mysql database
To enable the query log, put this in /etc/my.cnf in the [mysqld] section log = /path/to/query.log #works for mysql < 5.1.29 Also, to enableRead More »