Learn how to install mysql extension in centos

Source: Internet
Author: User
Learn how to install mysql extension in centos

  1. # Cd/usr/ChenShao/php-5.3.1/

2. go to the mysql extension source code directory to be added:

  1. # Cd ext/mysql/

2. call phpize in compiled php:

  1. #/Usr/local/php5/bin/phpize

3. then configure:

  1. #./Configure -- with-php-config =/usr/local/php5/bin/php-config -- with-mysql =/usr/local/mysql
  2. (/Usr/local/mysql is the installation directory of mysql)

4,

  1. Make & make install

5. after compilation, mysql is automatically loaded. so to the default php extension directory (phpinfo can be viewed, here is/usr/local/php5/lib/php/extensions/no-debug-zts-20090626), and then modify php. ini, remove the semicolon before extension = php_mysql.so. Note: the generated module is mysql. so, which is different from php_mysql.so in php. ini. you must change mysql. so to php_mysql.so. remember to remember ~! 6. restart apache:

  1. # Service httpd restart

Note: If step 1 passes, but step 2 reports an error, it may be a source code problem. You can download a new file from php.net and recompile it.

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.