Introduction of MySql Database and Administrative MySQL Command:


, RDBMS used being used for many small and big businesses. MySQL is developed, marketed, and supported by MySQL AB, which is a Swedish company. MySQL is becoming so popular because of many good reasons.
MySQL is released under an open-source license. So you have nothing to pay to use it.
MySQL is a very powerful program in its own right. It handles a large subset of the functionality of the most expensive and powerful database packages.
MySQL uses a standard form of the well-known SQL data language.
MySQL works on many operating systems and with many languages including PHP. PERL, C, C++, JAVA etc.
MySQL works very quickly and works well even with large data sets.
MySQL is very friendly to PHP, the most appreciated language for web development.
MySQL supports large databases, up to 50 million rows or more in a table. The default file size limit for a table is 4GB.
Administrative :
Here is the list of important MySQL command which you will use time to time to work with MySQL database:
USE Databasename: This will be used to select a particular database in MySQL workarea.
SHOW DATABASES: Lists the databases that are accessible by the MySQL
DBMS.
SHOW TABLES: Shows the tables in the database once a database has been
selected with the use command.
SHOW COLUMNS FROM tablename: Shows the attributes, types of attributes, key information, whether NULL is permitted, defaults, and other information for a table.
SHOW INDEX FROM tablename: Presents the details of all indexes on the table, including the PRIMARY KEY.
SHOW TABLE STATUS LIKE tablename G: Reports details of the MySQL DBMS performance and statistics.

MySQL works very well in combination of various like PERL, C, C++, JAVA and PHP. Out of these languages, PHP is the most popular one because of its web application development capabilities.

PHP provides various functions to access MySQL database and to manipulate data records inside MySQL database. You would require to call PHP functions in the same way you call any other PHP function.

The PHP functions for use with MySQL have the following general format:

mysql_function (value, value,…);

The second part of the function name is specific to the function, usually a word that describes what the function does. The following are two of the functions which we will use in our tutorial

mysqli_connect ($connect);

mysqli_query($connect, “SQL statement”);

Following example shows a generic sysntax of PHP to call any MySQL function.

 

PHP with MySQL

$retval = mysql_function(value, [value,…]);

if( !$retval )

{

die(“Error: a related error message” );

}

// Otherwise MySQL or PHP Statements

Starting from next chapter we will see all the important MySQL functionality along with PHP.