How to Connect MySql Database using PHP

How to Connect MySql Database using PHPHow to connect MySql database using PHP. PHP provides inbuilt functions to connect to MySql database using their extensions. In this post, I’ll explain how to connect MySql Database using ¬†PHP.

In PHP, you can connect MySql database using following extensions.

MySqli Tutorial:PHP MySqli Extension

PHP provides three api to connect mysql Database.

1. MySql
2. MySqli
3. PDO

Subscribe Our Tutorials

Get Latest Updates on Facebook

Out of these three MySql extension is deprecated as of PHP 5.5.0, and will be removed in the future.

MYSQLI is an improved object oriented extension introduced in PHP 5.