search

Home  >  Q&A  >  body text

nginx - Set up lnmp environment and connect mysql externally. How should I compile my php?

./configure --enable-opcache --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr /local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-mbstring=all --with-pdo-mysql --enable-sockets --enable-mbstring --enable-fpm - -with-curl --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --enable-xml --with -gd --with-mcrypt --with-libxml-dir=/usr --enable-xml --with-openssl --with-iconv=/usr/local/iconv

MySQL is not installed in my environment and is connected to the Alibaba Cloud database

How to compile that part of mysql?

世界只因有你世界只因有你2783 days ago486

reply all(3)I'll reply

  • ringa_lee

    ringa_lee2017-05-16 13:03:41

    Since you are using Alibaba's rds, you only need to install Php's mysqli extension, and use the address provided by Alibaba when connecting to mysql. No need to install Mysql separately

    reply
    0
  • 给我你的怀抱

    给我你的怀抱2017-05-16 13:03:41

    Mysql can be installed normally. PHP installs the mysql extension, `--with-mysql=/usr/local/mysql
    --with-mysqli=/usr/local/mysql/bin/mysql_config`. There are many specific tutorials on the Internet. Please give me a step-by-step guide. Just follow the tutorial step by step, the writing is generally quite detailed.
    Attached is the address:
    http://www.jb51.net/article/9...

    reply
    0
  • PHPz

    PHPz2017-05-16 13:03:41

    Connecting to external MySQL does not require any modification to PHP or its extensions. Just give the correct address. The account and password database are correct

    reply
    0
  • Cancelreply