php-mysqlHow to install MySQL extension for PHP?
- To install MySQL extension for PHP, you need to have the MySQL server installed and running.
- Then, you need to install the PHP MySQL extension. This can be done by running the following command in the terminal:
$ sudo apt-get install php-mysql
- After the installation is complete, you need to restart the web server for the changes to take effect.
- You can then verify that the MySQL extension is installed by running the following command in the terminal:
$ php -m | grep mysql
- The output should be something like this:
mysql
mysqli
pdo_mysql
Helpful links
More of Php Mysql
- How to use utf8mb4_unicode_ci in MySQL with PHP?
- How to use a MySQL union in PHP?
- How to create an SSL connection to MySQL using PHP?
- How to generate a UUID in MySQL using PHP?
- How to get the first row of a result in MySQL using PHP?
- How to return multiple rows as an array in MySQL using PHP?
- How to check the result of an insert in PHP and MySQL?
- How to set a timeout for MySQL query in PHP?
- How to get the error message for a MySQL query using PHP?
- How to order by a column in ascending order in MySQL using PHP?
See more codes...