MySQL is the most popular Open Source Relational SQL database management system. MySQL is one of the best RDBMS being used for developing web-based software applications.
PHP works well when paired with a MySQL database. Soon after the PHP language was created, a few modules were written to simplify working with databases. These modules make it easy and efficient to work with MySQL databases in PHP.
Common alternatives to MySQL are PostgreSQL and MariaDB. PostgreSQL and MariaDB are different because they more closely resemble enterprise databases such as Oracle, while MySQL is built to be easy to use and has obtained wide support on numerous platforms.
While MySQL is a relational database, PostgreSQL is an object relational database, meaning it incorporates the use of objects, classes, and other structures used in object oriented programming languages like Java. PHP code can also be written in an object-oriented fashion using tools that are built into the language, so it can also work well with object relational databases.