There are several compelling reasons not to use this extension and this guide should be what settles this once and for all.
Reasons to Stop Using the PHP MySQL Extensions
- For starters, the MySQL extension is no longer under active development and it hasn’t been for over 5 years now. So how long?
- The extension was officially deprecated as of PHP 5.5. This version of PHP was released in June 2013.
- Things got worse. As of PHP 7.0 it has been entirely removed.
- There is no support for prepared statements making it less secure and vulnerable to attacks.
- Still, on security, it does not support the new password authentication method which was turned on by default in MySQL 5.6 and required in MySQL 5.7. It is also important to note that MySQL 8.0 introduces yet another new password authentication method not discussed here.
- It also does not support all of the functionality that came in in MySQL 5.1.
- It lacks an Object-Oriented In computing, an interface is a shared means by which two or more separate components of a computer system exchange information. The interface could be between the human and a computing device, two computers, computer hardware, software or peripheral devices. Examples include touch screens which allow information to be exchanged between a human and the devices, A software graphical interface,... More.
- The extension does not support non-blocking, asynchronous queries.
- It does not support transactions, nor stored procedures.
- It keeps getting worse. The MySQL extension functions do not support multiple statements.
I’m sure those should be compelling reasons to get you off using the MySQL extension functions in your current and new projects.