Home >Backend Development >PHP Tutorial >Make php support mysql under centos
I only installed one php-mysql here~~
<code>[root@LAMP1 controllers]# yum install php-mysql Loaded plugins: fastestmirror, presto Loading mirror speeds from cached hostfile <span> * base: mirrors.pubyun.com</span><span> * extras: mirrors.163.com</span><span> * updates: mirrors.skyshe.cn</span> Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package php-mysql.x86<span>_64 0:5.3.3-40.el6_</span>6 will be installed --> Processing Dependency: php-pdo(x86-64) for package: php-mysql-5.3.3-40.el6<span>_6.x86_</span>64 --> Running transaction check ---> Package php-pdo.x86<span>_64 0:5.3.3-40.el6_</span>6 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================================================================================================== Package Arch Version Repository Size ============================================================================================================================================================================================== Installing: <span> php-mysql x86_64 5.3.3-40.el6_6 updates 84 k</span> Installing for dependencies: <span> php-pdo x86_64 5.3.3-40.el6_6 updates 78 k</span><span>Transaction Summary ==============================================================================================================================================================================================</span> Install 2 Package(s) Total download size: 162 k Installed size: 384 k Is this ok [y/N]: y Downloading Packages: Setting up and reading Presto delta metadata Processing delta metadata Package(s) data still to download: 162 k (1/2): php-mysql-5.3.3-40.el6<span>_6.x86_</span>64.rpm | 84 kB 00:00 <span>(2/2): php-pdo-5.3.3-40.el6_6.x86_64.rpm | 78 kB 00:00 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span> Total 299 kB/s | 162 kB 00:00 Running rpm<span>_check_</span>debug Running Transaction Test Transaction Test Succeeded Running Transaction <span> Installing : php-pdo-5.3.3-40.el6_6.x86_64 1/2 </span><span> Installing : php-mysql-5.3.3-40.el6_6.x86_64 2/2 </span><span> Verifying : php-pdo-5.3.3-40.el6_6.x86_64 1/2 </span><span> Verifying : php-mysql-5.3.3-40.el6_6.x86_64 2/2 </span>Installed: <span> php-mysql.x86_64 0:5.3.3-40.el6_6 </span>Dependency Installed: <span> php-pdo.x86_64 0:5.3.3-40.el6_6 </span>Complete! [root@LAMP1 controllers]# /etc/init.d/httpd restart</code>
The above introduces how to make PHP support mysql under centos, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.