MySQL is an open-source database commonly used with PHP. A database contains tables which are made up of rows and columns used to categorically store information. In PHP, a connection to a MySQL database is established through the mysql_connect() function. Queries can then be used to insert, select, update and delete data from database tables.