MySQL is the database of choice for a vast majority of web developers who use PHP, because of its efficiency and ease of use. Plus, MySQL is free, runs on multiple platforms, and its documentation is superb. When using MySQL with PHP, it's easiest to install MySQL first, because during the PHP installation and configuration process, you must tell the PHP configuration script that you plan to use MySQL in order to activate the MySQL-specific functions. As such, it's best to make sure that MySQL is present on your system, in case there are any library mismatch issues that would cause PHP to fail in its compilation. In this chapter, you learn how to:
Install MySQL on Windows or Linux
Create a sample database
Create a sample table