Skip to content

linux下安装myslq_pdo

转载本站文章请注明:
转载来至:[记录与PHP的PK经历]
本文链接: linux下安装myslq_pdo

如下命令编译php:

./configure –prefix=/usr/local/php –with-apxs2=/usr/local/apache2/bin/apxs –with-jpeg-dir=/usr/local/jpeg6/ –with-png-dir=/usr/local/libpng2/ –with-gd=/usr/local/gd2/ –with-freetype-dir=/usr/local/freetype2/ –enable-trace-vars –with-zlib-dir=/usr/local/zlib2/ -with-mysql=/usr/local/mysql -with-pdo=shared -with-pdo-mysql=shared

重启动apache后查看phpinfo:

pdo_mysql
PDO Driver for MySQL, client library version 5.0.51a

证明成功!

使用程序测试pdo提示无法链接/tmp/mysql.sock

使用命令:

ln -s  /var/lib/mysql/mysql.sock /tmp/mysql.sock
建立文件链接,再次测试成功!

淘宝api(1)

中文关键字:linux mysql php 命令 链接 apache 文件 成功 version pr 安装 myslq pdo local with

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*
Note: Commenter is allowed to use '@User+blank' to automatically notify your reply to other commenter. e.g, if ABC is one of commenter of this post, then write '@ABC '(exclude ') will automatically send your comment to ABC. Using '@all ' to notify all previous commenters. Be sure that the value of User should exactly match with commenter's name (case sensitive).