How to load mysql extension using centosphp

Source: Internet
Author: User
I configured LAMP to use yum for installation. I will not elaborate on the methods for installing other services, but I will mainly discuss this problem. Install PHP # yuminstallphp53 install apache2 # yuminstallhttpd install mysql # yuminstallmysql-server install these items through the above steps. When you use phpinfo (),

I configured LAMP to use yum for installation. I will not elaborate on the methods for installing other services, but I will mainly discuss this problem. Install PHP # yum install php53 install apache2 # yum install httpd install mysql # yum install mysql-server install these items through the above steps. When you use phpinfo (),

I configured LAMP to use yum for installation. I will not elaborate on the methods for installing other services, but I will mainly discuss this problem.
Install PHP
# Yum install php53
Install apache2
# Yum install httpd
Install mysql
# Yum install mysql-server
Install these items through the above steps. When using phpinfo (), you will find that there is no mysql in it, but only '-without-mysql' is in Configure Command. It was quite impatient at a time, and we could not remove the # before the extension configuration as we did in win's case. This is not the case with yum installation.
If the source of your yum has not changed, you can find
# Yum search php-mysql
In this case, different search results are displayed based on the specific situation. The result I found is:
Php-mysql.i386: a module for using a PHP program in a MySQL database.
Php53-mysql.i386: A module for PHP applications that use MySQL databases
Php53-mysql.i386 is what I want to find.
Use yum to install
# Yum install php53-mysql.i386
PS: Many online users talk about yum install php-mysql. If you use centos 5.6 or a later version, you will find that this package cannot be found.

After the above method is installed, check your phpinfo () Again, which will change. If you don't understand, you can leave a message for me.


Http://www.sosbox.cn/2012/0601/1030.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.